diff options
author | Rich Trott <rtrott@gmail.com> | 2017-06-09 21:23:23 -0700 |
---|---|---|
committer | James M Snell <jasnell@gmail.com> | 2017-06-13 12:39:46 -0700 |
commit | 7f18532cf8c864b1e86f9be564baf36aa1a2eb0a (patch) | |
tree | 42a4a333755397a8ca483f4366c5cac0a5a3f1dc /test/sequential/test-fs-watch.js | |
parent | 873e2f270fa67c701d59bc99f0f815f1f69b2316 (diff) | |
download | android-node-v8-7f18532cf8c864b1e86f9be564baf36aa1a2eb0a.tar.gz android-node-v8-7f18532cf8c864b1e86f9be564baf36aa1a2eb0a.tar.bz2 android-node-v8-7f18532cf8c864b1e86f9be564baf36aa1a2eb0a.zip |
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: https://github.com/nodejs/node/pull/13595
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'test/sequential/test-fs-watch.js')
-rw-r--r-- | test/sequential/test-fs-watch.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/sequential/test-fs-watch.js b/test/sequential/test-fs-watch.js index ed0ff3d922..70c165ea79 100644 --- a/test/sequential/test-fs-watch.js +++ b/test/sequential/test-fs-watch.js @@ -130,7 +130,7 @@ fs.watch(__filename, {persistent: false}, function() { // https://github.com/joyent/node/issues/6690 let oldhandle; assert.throws(function() { - const w = fs.watch(__filename, common.noop); + const w = fs.watch(__filename, common.mustNotCall()); oldhandle = w._handle; w._handle = { close: w._handle.close }; w.close(); @@ -138,7 +138,7 @@ assert.throws(function() { oldhandle.close(); // clean up assert.throws(function() { - const w = fs.watchFile(__filename, {persistent: false}, common.noop); + const w = fs.watchFile(__filename, {persistent: false}, common.mustNotCall()); oldhandle = w._handle; w._handle = { stop: w._handle.stop }; w.stop(); |