Skip to content

Commit 6478260

Browse files
committed
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 <[email protected]> Reviewed-By: Franziska Hinkelmann <[email protected]> Reviewed-By: cjihrig - Colin Ihrig <[email protected]> Reviewed-By: jasnell - James M Snell <[email protected]> Reviewed-By: Santiago Gimeno <[email protected]>
1 parent e7bd4d2 commit 6478260

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
@@ -56,6 +56,9 @@ assert.throws(makeBlock(a.strictEqual, 2, '2'),
5656
assert.throws(makeBlock(a.strictEqual, null, undefined),
5757
a.AssertionError, 'strictEqual(null, undefined)');
5858

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

0 commit comments

Comments
 (0)