Browse Source

test: add assert.notDeepEqual() tests

There are currently no tests for assert.notDeepEqual(). Add some minimal
tests.

PR-URL: https://github.com/nodejs/node/pull/8156
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Claudio Rodriguez <cjrodr@yahoo.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
v7.x
Rich Trott 8 years ago
parent
commit
294e3008ad
  1. 15
      test/parallel/test-assert.js

15
test/parallel/test-assert.js

@ -72,6 +72,21 @@ assert.throws(makeBlock(a.deepEqual, new Date(), new Date(2000, 3, 14)),
a.AssertionError,
'deepEqual(new Date(), new Date(2000, 3, 14))');
assert.throws(makeBlock(
a.notDeepEqual,
new Date(2000, 3, 14),
new Date(2000, 3, 14)),
a.AssertionError,
'notDeepEqual(new Date(2000, 3, 14), new Date(2000, 3, 14))'
);
assert.doesNotThrow(makeBlock(
a.notDeepEqual,
new Date(),
new Date(2000, 3, 14)),
'notDeepEqual(new Date(), new Date(2000, 3, 14))'
);
// 7.3
assert.doesNotThrow(makeBlock(a.deepEqual, /a/, /a/));
assert.doesNotThrow(makeBlock(a.deepEqual, /a/g, /a/g));

Loading…
Cancel
Save