Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 3bc7d2a

Browse filesBrowse files
Helianthus21Fishrock123
authored andcommitted
test: replace string concat in test-fs-watchfile.js
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>
1 parent dc0a26f commit 3bc7d2a
Copy full SHA for 3bc7d2a

File tree

Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed
Open diff view settings
Collapse file

‎test/parallel/test-fs-watchfile.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-fs-watchfile.js
+2-2Lines changed: 2 additions & 2 deletions
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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.