Skip to content

Commit c9af24d

Browse files
TrottMylesBorins
authored andcommitted
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: #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>
1 parent ea72e9f commit c9af24d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

test/parallel/test-assert.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@ assert.throws(makeBlock(a.strictEqual, 2, '2'),
5555
assert.throws(makeBlock(a.strictEqual, null, undefined),
5656
a.AssertionError, 'strictEqual(null, undefined)');
5757

58+
assert.throws(makeBlock(a.notStrictEqual, 2, 2),
59+
a.AssertionError, 'notStrictEqual(2, 2)');
60+
5861
assert.doesNotThrow(makeBlock(a.notStrictEqual, 2, '2'),
5962
'notStrictEqual(2, \'2\')');
6063

0 commit comments

Comments
 (0)