test: add #2293 regression test

Creating a file event watcher with fs.watch({persistent:false}) should not block
the event loop.
This commit is contained in:
Ben Noordhuis 2012-01-02 10:48:33 +01:00
parent 41f2725639
commit 884f689efe

View File

@ -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);
});