Skip to content

Commit 80fa13b

Browse files
Trottaddaleax
authored andcommitted
test: use mustNotCall() in test-fs-watch
Use common.mustNotCall() in test/sequential/test-fs-watch.js in situations where the call to watch() is expected to throw. PR-URL: #13595 Reviewed-By: Yuta Hiroto <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent 7874360 commit 80fa13b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/sequential/test-fs-watch.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -130,15 +130,15 @@ fs.watch(__filename, {persistent: false}, function() {
130130
// https://github.com/joyent/node/issues/6690
131131
let oldhandle;
132132
assert.throws(function() {
133-
const w = fs.watch(__filename, common.noop);
133+
const w = fs.watch(__filename, common.mustNotCall());
134134
oldhandle = w._handle;
135135
w._handle = { close: w._handle.close };
136136
w.close();
137137
}, /^TypeError: Illegal invocation$/);
138138
oldhandle.close(); // clean up
139139

140140
assert.throws(function() {
141-
const w = fs.watchFile(__filename, {persistent: false}, common.noop);
141+
const w = fs.watchFile(__filename, {persistent: false}, common.mustNotCall());
142142
oldhandle = w._handle;
143143
w._handle = { stop: w._handle.stop };
144144
w.stop();

0 commit comments

Comments
 (0)