Browse Source

test: add test for assert.notStrictEqual()

There is currently no test for `assert.notStrictEqual()` throwing an
`AssertionError` when passed identical values. This change adds such a
test.

PR-URL: https://github.com/nodejs/node/pull/8091
Reviewed-By: targos - Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: cjihrig - Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: jasnell - James M Snell <jasnell@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
v4.x
Rich Trott 8 years ago
committed by Myles Borins
parent
commit
c9af24d2a7
  1. 3
      test/parallel/test-assert.js

3
test/parallel/test-assert.js

@ -55,6 +55,9 @@ assert.throws(makeBlock(a.strictEqual, 2, '2'),
assert.throws(makeBlock(a.strictEqual, null, undefined),
a.AssertionError, 'strictEqual(null, undefined)');
assert.throws(makeBlock(a.notStrictEqual, 2, 2),
a.AssertionError, 'notStrictEqual(2, 2)');
assert.doesNotThrow(makeBlock(a.notStrictEqual, 2, '2'),
'notStrictEqual(2, \'2\')');

Loading…
Cancel
Save