From 9c6d2ae415b6e8780109f47f51a30c6373f4c63a Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Fri, 9 Jun 2017 21:23:23 -0700 Subject: [PATCH] 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. --- test/sequential/test-fs-watch.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/sequential/test-fs-watch.js b/test/sequential/test-fs-watch.js index ed0ff3d9227064..70c165ea7992be 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();