summaryrefslogtreecommitdiff
path: root/test/parallel/test-fs-watchfile.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/parallel/test-fs-watchfile.js')
-rw-r--r--test/parallel/test-fs-watchfile.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/test/parallel/test-fs-watchfile.js b/test/parallel/test-fs-watchfile.js
index 4434f3f65f..35ac9b88e1 100644
--- a/test/parallel/test-fs-watchfile.js
+++ b/test/parallel/test-fs-watchfile.js
@@ -1,21 +1,21 @@
'use strict';
-
const common = require('../common');
+
+const assert = require('assert');
const fs = require('fs');
const path = require('path');
-const assert = require('assert');
// Basic usage tests.
assert.throws(function() {
fs.watchFile('./some-file');
-}, /"watchFile\(\)" requires a listener function/);
+}, /^Error: "watchFile\(\)" requires a listener function$/);
assert.throws(function() {
fs.watchFile('./another-file', {}, 'bad listener');
-}, /"watchFile\(\)" requires a listener function/);
+}, /^Error: "watchFile\(\)" requires a listener function$/);
assert.throws(function() {
- fs.watchFile(new Object(), common.noop);
+ fs.watchFile(new Object(), common.mustNotCall());
}, common.expectsError({code: 'ERR_INVALID_ARG_TYPE', type: TypeError}));
const enoentFile = path.join(common.tmpDir, 'non-existent-file');