Skip to content

Commit

Permalink
squash me
Browse files Browse the repository at this point in the history
  • Loading branch information
Trott committed Apr 28, 2016
1 parent 6d13a40 commit 26eb196
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions lib/assert.js
Original file line number Diff line number Diff line change
Expand Up @@ -193,8 +193,9 @@ function _deepEqual(actual, expected, strict, memos) {
} else {
memos = memos || {actual: [], expected: []};

if (memos.actual.includes(actual)) {
if (memos.actual.indexOf(actual) === memos.expected.indexOf(expected)) {
const actualIndex = memos.actual.indexOf(actual);
if (actualIndex !== -1) {
if (actualIndex === memos.expected.indexOf(expected)) {
return true;
}
}
Expand Down
4 changes: 2 additions & 2 deletions test/parallel/test-assert.js
Original file line number Diff line number Diff line change
Expand Up @@ -401,8 +401,8 @@ assert.ok(threw);
e.a = 1;
e.b = e.a;

a.throws(makeBlock(a.deepEqual, d, e));
a.throws(makeBlock(a.deepStrictEqual, d, e));
a.throws(makeBlock(a.deepEqual, d, e), /AssertionError/);
a.throws(makeBlock(a.deepStrictEqual, d, e), /AssertionError/);
}
// GH-7178. Ensure reflexivity of deepEqual with `arguments` objects.
var args = (function() { return arguments; })();
Expand Down

0 comments on commit 26eb196

Please sign in to comment.