Skip to content

Commit

Permalink
failing deepEqual comparison with undefined throws
Browse files Browse the repository at this point in the history
  • Loading branch information
James Halliday committed Jun 7, 2011
1 parent 0c1e021 commit 0a6d27d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/equal.js
Original file line number Diff line number Diff line change
Expand Up @@ -191,3 +191,10 @@ exports.deepArguments = function () {
'arguments should equal'
));
};

exports.deepUndef = function () {
assert.ok(!traverse.deepEqual({ a : 1, b : 2 }, undefined));
assert.ok(!traverse.deepEqual({ a : 1, b : 2 }, {}));
assert.ok(!traverse.deepEqual(undefined, { a : 1, b : 2 }));
assert.ok(!traverse.deepEqual({}, { a : 1, b : 2 }));
};

0 comments on commit 0a6d27d

Please sign in to comment.