3 module.exports = function (T, a) {
4 var x = {}, y = {}, z = {}, arr = [[x, 'raz'], [y, 'dwa']], map = new T(arr);
6 a(map instanceof T, true, "WeakMap");
7 a(map.has(x), true, "Has: true");
8 a(map.get(x), 'raz', "Get: contains");
9 a(map.has(z), false, "Has: false");
10 a(map.get(z), undefined, "Get: doesn't contain");
11 a(map.set(z, 'trzy'), map, "Set: return");
12 a(map.has(z), true, "Add");
13 a(map.delete({}), false, "Delete: false");
15 a(map.delete(x), true, "Delete: true");
16 a(map.get(x), undefined, "Get: after delete");
17 a(map.has(x), false, "Has: after delete");
19 a(map.has(y), true, "Has: pre clear");
21 a(map.has(y), false, "Has: after clear");