is-copy.js 465 B

123456789101112
  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, "Same lists");
  8. a(t.call([1, x, "raz"], [x, 1, "raz"]), false, "Diff order");
  9. a(t.call([1, x], [1, x, "raz"]), false, "Diff length #1");
  10. a(t.call([1, x, "raz"], [1, x]), false, "Diff length #2");
  11. };