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 <[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]>
  • 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.