Skip to content

Commit

Permalink
[Tests] Failing tests for Map equality
Browse files Browse the repository at this point in the history
  • Loading branch information
Charlie Saunders authored and ljharb committed Sep 19, 2017
1 parent 3645129 commit 4856185
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions test/cmp.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,16 @@ test('equal', function (t) {
true,
false
);

t.deepEqualTest(
new Map([['a', 1], ['b', 2]]),
new Map([['b', 2], ['a', 1]]),
'two equal Maps',
true,
true,
false
);

t.end();
});

Expand All @@ -23,6 +33,23 @@ test('not equal', function (t) {
false,
false
);

t.deepEqualTest(
new Map([['a', [1, 2]]]),
new Map([['a', [2, 1]]]),
'two Maps with inequal values on the same key',
false,
false
);

t.deepEqualTest(
new Map([['a', 1]]),
new Map([['b', 1]]),
'two inequal Maps',
false,
false
);

t.end();
});

Expand Down

0 comments on commit 4856185

Please sign in to comment.