From dfe5fea88483d3f80678b59f7481371fe02e1d9f Mon Sep 17 00:00:00 2001 From: Andrew Thornton Date: Sat, 7 Dec 2013 12:56:42 +0000 Subject: [PATCH] Add test for symlinks to test ENOENT errors. Fixes GH-60. Fixes GH-45. --- test/watch_test.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/watch_test.js b/test/watch_test.js index 151402b..ed82e4c 100644 --- a/test/watch_test.js +++ b/test/watch_test.js @@ -31,6 +31,15 @@ exports.watch = { cleanUp(done); }, tearDown: cleanUp, + testnotexists: function(test) { + test.expect(0); + fs.mkdirSync(path.resolve(__dirname, 'fixtures', 'new_dir')); + fs.symlinkSync(path.resolve(__dirname, 'fixtures', 'not-exists.js'), path.resolve(__dirname, 'fixtures', 'new_dir', 'not-exists-symlink.js')); + gaze('**/*', function() { + this.close(); + test.done(); + }); + }, remove: function(test) { test.expect(2); gaze('**/*', function() {