]> git.r.bdr.sh - rbdr/dotfiles/blob
394e2ed94c09f0e4b6b0d84ffe3c851a6e223ec6
[rbdr/dotfiles] /
1 'use strict';
2
3 module.exports = function (t, a) {
4 a(t({ 1: 1, 2: 2, 3: 3 }, { 1: 1, 2: 2, 3: 3 }), true, "Same");
5 a(t({ 1: 1, 2: 2, 3: 3 }, { 1: 1, 2: 2, 3: 4 }), false,
6 "Different property value");
7 a(t({ 1: 1, 2: 2, 3: 3 }, { 1: 1, 2: 2 }), false,
8 "Property only in source");
9 a(t({ 1: 1, 2: 2 }, { 1: 1, 2: 2, 3: 4 }), false,
10 "Property only in target");
11
12 a(t("raz", "dwa"), false, "String: diff");
13 a(t("raz", "raz"), true, "String: same");
14 a(t("32", 32), false, "String & Number");
15
16 a(t([1, 'raz', true], [1, 'raz', true]), true, "Array: same");
17 a(t([1, 'raz', undefined], [1, 'raz']), false, "Array: diff");
18 };