contains.js 545 B

123456789101112131415161718192021
  1. "use strict";
  2. module.exports = {
  3. "__generic": function (t, a) {
  4. a(t.call(this, this[1]), true, "Contains");
  5. a(t.call(this, {}), false, "Does Not contain");
  6. },
  7. "": function (t, a) {
  8. var o, x = {}, y = {};
  9. o = [1, "raz", x];
  10. a(t.call(o, 1), true, "First");
  11. a(t.call(o, "1"), false, "Type coercion");
  12. a(t.call(o, "raz"), true, "Primitive");
  13. a(t.call(o, "foo"), false, "Primitive not found");
  14. a(t.call(o, x), true, "Object found");
  15. a(t.call(o, y), false, "Object not found");
  16. a(t.call(o, 1, 1), false, "Position");
  17. }
  18. };