is-copy.js 468 B

12345678910111213
  1. "use strict";
  2. module.exports = function (t, a) {
  3. var x = {};
  4. a(t.call([], []), true, "Empty");
  5. a(t.call([], {}), true, "Empty lists");
  6. a(t.call([1, x, "raz"], [1, x, "raz"]), true, "Same");
  7. a(t.call([1, x, "raz"], { 0: 1, 1: x, 2: "raz", length: 3 }), true,
  8. "Same lists");
  9. a(t.call([1, x, "raz"], [x, 1, "raz"]), false, "Diff order");
  10. a(t.call([1, x], [1, x, "raz"]), false, "Diff length #1");
  11. a(t.call([1, x, "raz"], [1, x]), false, "Diff length #2");
  12. };