diff options
Diffstat (limited to 'test/parallel/test-fs-watchfile.js')
-rw-r--r-- | test/parallel/test-fs-watchfile.js | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/parallel/test-fs-watchfile.js b/test/parallel/test-fs-watchfile.js new file mode 100644 index 0000000000..a64858ce0f --- /dev/null +++ b/test/parallel/test-fs-watchfile.js @@ -0,0 +1,17 @@ +'use strict'; + +const fs = require('fs'); +const assert = require('assert'); + +// Basic usage tests. +assert.throws(function() { + fs.watchFile('./some-file'); +}, /watchFile requires a listener function/); + +assert.throws(function() { + fs.watchFile('./another-file', {}, 'bad listener'); +}, /watchFile requires a listener function/); + +assert.throws(function() { + fs.watchFile(new Object(), function() {}); +}, /Path must be a string/); |