diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2024-06-11 12:41:44 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-11 11:41:44 +0000 |
commit | 6a356aff1380e79d67738c5b43aa2b5fee76600d (patch) | |
tree | be4aadc62a523ff280820958a1a3829f1a18ca7d /tests/node_compat/test/parallel/test-fs-watchfile.js | |
parent | 3d41b486da7dcba49c8a18b45425e356c329d986 (diff) |
chore: sync up Node.js test files for v20.11.1 (#24066)
Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com>
Diffstat (limited to 'tests/node_compat/test/parallel/test-fs-watchfile.js')
-rw-r--r-- | tests/node_compat/test/parallel/test-fs-watchfile.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/node_compat/test/parallel/test-fs-watchfile.js b/tests/node_compat/test/parallel/test-fs-watchfile.js index 7419b276c..ccbaabe06 100644 --- a/tests/node_compat/test/parallel/test-fs-watchfile.js +++ b/tests/node_compat/test/parallel/test-fs-watchfile.js @@ -37,7 +37,7 @@ assert.throws(() => { fs.watchFile(new Object(), common.mustNotCall()); }, { code: 'ERR_INVALID_ARG_TYPE', name: 'TypeError' }); -const enoentFile = path.join(tmpdir.path, 'non-existent-file'); +const enoentFile = tmpdir.resolve('non-existent-file'); const expectedStatObject = new fs.Stats( 0, // dev 0, // mode @@ -92,14 +92,14 @@ watcher.on('stop', common.mustCall()); // Watch events should callback with a filename on supported systems. // Omitting AIX. It works but not reliably. if (common.isLinux || common.isOSX || common.isWindows) { - const dir = path.join(tmpdir.path, 'watch'); + const dir = tmpdir.resolve('watch'); fs.mkdir(dir, common.mustCall(function(err) { if (err) assert.fail(err); - fs.watch(dir, common.mustCall(function(eventType, filename) { + const handle = fs.watch(dir, common.mustCall(function(eventType, filename) { clearInterval(interval); - this._handle.close(); + handle.close(); assert.strictEqual(filename, 'foo.txt'); })); |