Skip to content

Commit 3bc7d2a

Browse files
Helianthus21Fishrock123
authored andcommitted
test: replace string concat in test-fs-watchfile.js
PR-URL: #14287 Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent dc0a26f commit 3bc7d2a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/parallel/test-fs-watchfile.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ fs.watchFile(enoentFile, {interval: 0}, common.mustCall(function(curr, prev) {
6767
// Watch events should callback with a filename on supported systems.
6868
// Omitting AIX. It works but not reliably.
6969
if (common.isLinux || common.isOSX || common.isWindows) {
70-
const dir = common.tmpDir + '/watch';
70+
const dir = path.join(common.tmpDir, 'watch');
7171

7272
fs.mkdir(dir, common.mustCall(function(err) {
7373
if (err) assert.fail(err);
@@ -79,7 +79,7 @@ if (common.isLinux || common.isOSX || common.isWindows) {
7979
}));
8080

8181
const interval = setInterval(() => {
82-
fs.writeFile(`${dir}/foo.txt`, 'foo', common.mustCall(function(err) {
82+
fs.writeFile(path.join(dir, 'foo.txt'), 'foo', common.mustCall((err) => {
8383
if (err) assert.fail(err);
8484
}));
8585
}, 1);

0 commit comments

Comments
 (0)