summaryrefslogtreecommitdiff
path: root/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/contains.js
diff options
context:
space:
mode:
Diffstat (limited to 'tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/contains.js')
-rw-r--r--tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/contains.js21
1 files changed, 21 insertions, 0 deletions
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/contains.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/contains.js
new file mode 100644
index 0000000000..21404a17a6
--- /dev/null
+++ b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/contains.js
@@ -0,0 +1,21 @@
+'use strict';
+
+module.exports = {
+ __generic: function (t, a) {
+ a(t.call(this, this[1]), true, "Contains");
+ a(t.call(this, {}), false, "Does Not contain");
+ },
+ "": function (t, a) {
+ var o, x = {}, y = {};
+
+ o = [1, 'raz', x];
+
+ a(t.call(o, 1), true, "First");
+ a(t.call(o, '1'), false, "Type coercion");
+ a(t.call(o, 'raz'), true, "Primitive");
+ a(t.call(o, 'foo'), false, "Primitive not found");
+ a(t.call(o, x), true, "Object found");
+ a(t.call(o, y), false, "Object not found");
+ a(t.call(o, 1, 1), false, "Position");
+ }
+};