1
0

is-copy.js 628 B

123456789101112131415161718
  1. 'use strict';
  2. module.exports = function (t, a) {
  3. a(t({ 1: 1, 2: 2, 3: 3 }, { 1: 1, 2: 2, 3: 3 }), true, "Same");
  4. a(t({ 1: 1, 2: 2, 3: 3 }, { 1: 1, 2: 2, 3: 4 }), false,
  5. "Different property value");
  6. a(t({ 1: 1, 2: 2, 3: 3 }, { 1: 1, 2: 2 }), false,
  7. "Property only in source");
  8. a(t({ 1: 1, 2: 2 }, { 1: 1, 2: 2, 3: 4 }), false,
  9. "Property only in target");
  10. a(t("raz", "dwa"), false, "String: diff");
  11. a(t("raz", "raz"), true, "String: same");
  12. a(t("32", 32), false, "String & Number");
  13. a(t([1, 'raz', true], [1, 'raz', true]), true, "Array: same");
  14. a(t([1, 'raz', undefined], [1, 'raz']), false, "Array: diff");
  15. };