Skip to content

Commit 3003404

Browse files
TrottMylesBorins
authored andcommitted
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. PR-URL: #8129 Reviewed-By: Jeremiah Senkpiel <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
1 parent fe48415 commit 3003404

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/pummel/test-watch-file.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ function watchFile() {
1414
fs.watchFile(f, function(curr, prev) {
1515
console.log(f + ' change');
1616
changes++;
17-
assert.ok(curr.mtime != prev.mtime);
17+
assert.notDeepStrictEqual(curr.mtime, prev.mtime);
1818
fs.unwatchFile(f);
1919
watchFile();
2020
fs.unwatchFile(f);

0 commit comments

Comments
 (0)