Skip to content

Commit

Permalink
better failing levels test for deepEqual
Browse files Browse the repository at this point in the history
  • Loading branch information
James Halliday committed Jun 7, 2011
1 parent 0a6d27d commit 73efbe5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name" : "traverse",
"version" : "0.3.7",
"version" : "0.3.8",
"description" : "Traverse and transform objects by visiting every node on a recursive walk",
"author" : "James Halliday",
"license" : "MIT/X11",
Expand Down
7 changes: 6 additions & 1 deletion test/equal.js
Original file line number Diff line number Diff line change
Expand Up @@ -192,9 +192,14 @@ exports.deepArguments = function () {
));
};

exports.deepUndef = function () {
exports.deepUn = 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 }));
};

exports.deepLevels = function () {
var xs = [ 1, 2, [ 3, 4, [ 5, 6 ] ] ];
assert.ok(!traverse.deepEqual(xs, []));
};

0 comments on commit 73efbe5

Please sign in to comment.