Skip to content

Commit 853f605

Browse files
Trottevanlucas
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 f4698f3 commit 853f605

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)