From 44acbbf3307be2870eadab36a43bb920e963a9c7 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Tue, 16 Aug 2016 14:37:08 -0700 Subject: [PATCH] test: fix assertion in test-watch-file.js Because it is comparing two Date objects, an assertion in test/pummel/test-watch-file.js would never fire even if the two objects represented the same time. Use `assert.notDeepStrictEqual()` so that the assertion fires if different Date objects represent the same time. --- test/pummel/test-watch-file.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/pummel/test-watch-file.js b/test/pummel/test-watch-file.js index b87711c7a17c45..8fdf6b32b2d78c 100644 --- a/test/pummel/test-watch-file.js +++ b/test/pummel/test-watch-file.js @@ -14,7 +14,7 @@ function watchFile() { fs.watchFile(f, function(curr, prev) { console.log(f + ' change'); changes++; - assert.ok(curr.mtime != prev.mtime); + assert.notDeepStrictEqual(curr.mtime, prev.mtime); fs.unwatchFile(f); watchFile(); fs.unwatchFile(f);