From 4deb05434f8f5e25004a599eb909a7e14642f9ee Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Wed, 17 Aug 2016 22:42:33 -0700 Subject: [PATCH] test: add assert.notDeepEqual() tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit There are currently no tests for assert.notDeepEqual(). Add some minimal tests. PR-URL: https://github.com/nodejs/node/pull/8156 Reviewed-By: Michaƫl Zasso Reviewed-By: Claudio Rodriguez Reviewed-By: Santiago Gimeno Reviewed-By: James M Snell --- test/parallel/test-assert.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/test/parallel/test-assert.js b/test/parallel/test-assert.js index 1468330202a7d4..9bb466f2f94421 100644 --- a/test/parallel/test-assert.js +++ b/test/parallel/test-assert.js @@ -72,6 +72,21 @@ assert.throws(makeBlock(a.deepEqual, new Date(), new Date(2000, 3, 14)), a.AssertionError, 'deepEqual(new Date(), new Date(2000, 3, 14))'); +assert.throws(makeBlock( + a.notDeepEqual, + new Date(2000, 3, 14), + new Date(2000, 3, 14)), + a.AssertionError, + 'notDeepEqual(new Date(2000, 3, 14), new Date(2000, 3, 14))' +); + +assert.doesNotThrow(makeBlock( + a.notDeepEqual, + new Date(), + new Date(2000, 3, 14)), + 'notDeepEqual(new Date(), new Date(2000, 3, 14))' +); + // 7.3 assert.doesNotThrow(makeBlock(a.deepEqual, /a/, /a/)); assert.doesNotThrow(makeBlock(a.deepEqual, /a/g, /a/g));