Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 9a393a7

Browse filesBrowse files
Trottevanlucas
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 <fishrock123@rocketmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
1 parent f4c3456 commit 9a393a7
Copy full SHA for 9a393a7

File tree

Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed
Open diff view settings
Collapse file

‎test/pummel/test-watch-file.js‎

Copy file name to clipboardExpand all lines: test/pummel/test-watch-file.js
+1-1Lines changed: 1 addition & 1 deletion
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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.