From 853f605de4b5e40c86332dcd36d7e1e11bc49f60 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Fri, 12 Aug 2016 22:39:29 -0700 Subject: [PATCH] test: add test for assert.notStrictEqual() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-By: Franziska Hinkelmann Reviewed-By: cjihrig - Colin Ihrig Reviewed-By: jasnell - James M Snell Reviewed-By: Santiago Gimeno --- test/parallel/test-assert.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/parallel/test-assert.js b/test/parallel/test-assert.js index 34e7b643442138..43bd4c770e9cb8 100644 --- a/test/parallel/test-assert.js +++ b/test/parallel/test-assert.js @@ -56,6 +56,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\')');