test: replace string concat in test-fs-watchfile.js
PR-URL: https://github.com/nodejs/node/pull/14287 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
parent
c53db1e8e9
commit
6a587ad043
@ -67,7 +67,7 @@ fs.watchFile(enoentFile, {interval: 0}, common.mustCall(function(curr, prev) {
|
||||
// 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 = common.tmpDir + '/watch';
|
||||
const dir = path.join(common.tmpDir, 'watch');
|
||||
|
||||
fs.mkdir(dir, common.mustCall(function(err) {
|
||||
if (err) assert.fail(err);
|
||||
@ -79,7 +79,7 @@ if (common.isLinux || common.isOSX || common.isWindows) {
|
||||
}));
|
||||
|
||||
const interval = setInterval(() => {
|
||||
fs.writeFile(`${dir}/foo.txt`, 'foo', common.mustCall(function(err) {
|
||||
fs.writeFile(path.join(dir, 'foo.txt'), 'foo', common.mustCall((err) => {
|
||||
if (err) assert.fail(err);
|
||||
}));
|
||||
}, 1);
|
||||
|
Loading…
x
Reference in New Issue
Block a user