mirror of
https://github.com/nodejs/node.git
synced 2026-11-26 21:58:26 -05:00
test: fix recursive fs.watch error fixture
Use a child directory so recursive watcher setup always creates a second watch. Linux no longer watches regular files after the directory watcher optimization. Signed-off-by: Filip Skokan <panva.ip@gmail.com> Assisted-by: Codex PR-URL: https://github.com/nodejs/node/pull/65683 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
This commit is contained in:
1 parent
61ca3ba93c
commit
ba65bb149a
1 file changed
+1
-2
@@ -99,8 +99,7 @@ tmpdir.refresh();
|
||||
let calls = 0;
|
||||
|
||||
expected.code = 'ENOSPC';
|
||||
fs.mkdirSync(directory);
|
||||
fs.writeFileSync(`${directory}/file`, '');
|
||||
fs.mkdirSync(`${directory}/subdirectory`, { recursive: true });
|
||||
fs.watch = common.mustCall(() => {
|
||||
if (calls++ === 0) {
|
||||
return { close };
|
||||
|
||||
Reference in new issue
Block a user