aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/parallel/test-fs-watchfile.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/parallel/test-fs-watchfile.js b/test/parallel/test-fs-watchfile.js
index 35ac9b88e1..ca37073368 100644
--- a/test/parallel/test-fs-watchfile.js
+++ b/test/parallel/test-fs-watchfile.js
@@ -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);