From 558f7d999ca89496de88f5bad290f902425fac8e 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 01945b223d67f8..c609244a8838f3 100644 --- a/test/parallel/test-assert.js +++ b/test/parallel/test-assert.js @@ -71,6 +71,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));