Skip to content

Commit

Permalink
test: replace string concat in test-fs-watchfile.js
Browse files Browse the repository at this point in the history
PR-URL: #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>
  • Loading branch information
Helianthus21 authored and Fishrock123 committed Jul 24, 2017
1 parent dc0a26f commit 3bc7d2a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/parallel/test-fs-watchfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
Expand Down

0 comments on commit 3bc7d2a

Please sign in to comment.