From 884f689efecee487788d0b2d1289018735f2841c Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Mon, 2 Jan 2012 10:48:33 +0100 Subject: [PATCH] test: add #2293 regression test Creating a file event watcher with fs.watch({persistent:false}) should not block the event loop. --- test/simple/test-fs-watch.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/simple/test-fs-watch.js b/test/simple/test-fs-watch.js index 678d4e048c9..21fe3102e17 100644 --- a/test/simple/test-fs-watch.js +++ b/test/simple/test-fs-watch.js @@ -141,3 +141,9 @@ setTimeout(function() { var fd = fs.openSync(filepathThree, 'w'); fs.closeSync(fd); }, 1000); + +// https://github.com/joyent/node/issues/2293 - non-persistent watcher should +// not block the event loop +fs.watch(__filename, {persistent: false}, function() { + assert(0); +});