aboutsummaryrefslogtreecommitdiff
path: root/node_modules/es6-weak-map/test
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/es6-weak-map/test')
-rw-r--r--node_modules/es6-weak-map/test/implement.js3
-rw-r--r--node_modules/es6-weak-map/test/index.js6
-rw-r--r--node_modules/es6-weak-map/test/is-implemented.js14
-rw-r--r--node_modules/es6-weak-map/test/is-native-implemented.js3
-rw-r--r--node_modules/es6-weak-map/test/is-weak-map.js16
-rw-r--r--node_modules/es6-weak-map/test/polyfill.js23
-rw-r--r--node_modules/es6-weak-map/test/valid-weak-map.js19
7 files changed, 0 insertions, 84 deletions
diff --git a/node_modules/es6-weak-map/test/implement.js b/node_modules/es6-weak-map/test/implement.js
deleted file mode 100644
index 860027ed2..000000000
--- a/node_modules/es6-weak-map/test/implement.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof WeakMap, 'function'); };
diff --git a/node_modules/es6-weak-map/test/index.js b/node_modules/es6-weak-map/test/index.js
deleted file mode 100644
index 9b26e4fa7..000000000
--- a/node_modules/es6-weak-map/test/index.js
+++ /dev/null
@@ -1,6 +0,0 @@
-'use strict';
-
-module.exports = function (T, a) {
- var x = {};
- a((new T([[x, 'foo']])).get(x), 'foo');
-};
diff --git a/node_modules/es6-weak-map/test/is-implemented.js b/node_modules/es6-weak-map/test/is-implemented.js
deleted file mode 100644
index 0186871e2..000000000
--- a/node_modules/es6-weak-map/test/is-implemented.js
+++ /dev/null
@@ -1,14 +0,0 @@
-'use strict';
-
-var global = require('es5-ext/global')
- , polyfill = require('../polyfill');
-
-module.exports = function (t, a) {
- var cache;
- a(typeof t(), 'boolean');
- cache = global.WeakMap;
- global.WeakMap = polyfill;
- a(t(), true);
- if (cache === undefined) delete global.WeakMap;
- else global.WeakMap = cache;
-};
diff --git a/node_modules/es6-weak-map/test/is-native-implemented.js b/node_modules/es6-weak-map/test/is-native-implemented.js
deleted file mode 100644
index df8ba0323..000000000
--- a/node_modules/es6-weak-map/test/is-native-implemented.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof t, 'boolean'); };
diff --git a/node_modules/es6-weak-map/test/is-weak-map.js b/node_modules/es6-weak-map/test/is-weak-map.js
deleted file mode 100644
index ba8c04519..000000000
--- a/node_modules/es6-weak-map/test/is-weak-map.js
+++ /dev/null
@@ -1,16 +0,0 @@
-'use strict';
-
-var WeakMapPoly = require('../polyfill');
-
-module.exports = function (t, a) {
- a(t(undefined), false, "Undefined");
- a(t(null), false, "Null");
- a(t(true), false, "Primitive");
- a(t('raz'), false, "String");
- a(t({}), false, "Object");
- a(t([]), false, "Array");
- if (typeof WeakMap !== 'undefined') {
- a(t(new WeakMap()), true, "Native");
- }
- a(t(new WeakMapPoly()), true, "Polyfill");
-};
diff --git a/node_modules/es6-weak-map/test/polyfill.js b/node_modules/es6-weak-map/test/polyfill.js
deleted file mode 100644
index aaffe4a1c..000000000
--- a/node_modules/es6-weak-map/test/polyfill.js
+++ /dev/null
@@ -1,23 +0,0 @@
-'use strict';
-
-module.exports = function (T, a) {
- var x = {}, y = {}, z = {}, arr = [[x, 'raz'], [y, 'dwa']], map = new T(arr);
-
- a(map instanceof T, true, "WeakMap");
- a(map.has(x), true, "Has: true");
- a(map.get(x), 'raz', "Get: contains");
- a(map.has(z), false, "Has: false");
- a(map.get(z), undefined, "Get: doesn't contain");
- a(map.set(z, 'trzy'), map, "Set: return");
- a(map.has(z), true, "Add");
- a(map.delete({}), false, "Delete: false");
-
- a(map.delete(x), true, "Delete: true");
- a(map.get(x), undefined, "Get: after delete");
- a(map.has(x), false, "Has: after delete");
-
- a.h1("Empty initialization");
- map = new T();
- map.set(x, 'bar');
- a(map.get(x), 'bar');
-};
diff --git a/node_modules/es6-weak-map/test/valid-weak-map.js b/node_modules/es6-weak-map/test/valid-weak-map.js
deleted file mode 100644
index a7823421a..000000000
--- a/node_modules/es6-weak-map/test/valid-weak-map.js
+++ /dev/null
@@ -1,19 +0,0 @@
-'use strict';
-
-var WeakMapPoly = require('../polyfill');
-
-module.exports = function (t, a) {
- var map;
- a.throws(function () { t(undefined); }, TypeError, "Undefined");
- a.throws(function () { t(null); }, TypeError, "Null");
- a.throws(function () { t(true); }, TypeError, "Primitive");
- a.throws(function () { t('raz'); }, TypeError, "String");
- a.throws(function () { t({}); }, TypeError, "Object");
- a.throws(function () { t([]); }, TypeError, "Array");
- if (typeof WeakMap !== 'undefined') {
- map = new WeakMap();
- a(t(map), map, "Native");
- }
- map = new WeakMapPoly();
- a(t(map), map, "Polyfill");
-};