From 6a587ad043052dce2862cdf3c0a7375545368d87 Mon Sep 17 00:00:00 2001 From: Helianthus21 <740051540@qq.com> Date: Sun, 16 Jul 2017 15:56:25 +0800 Subject: test: replace string concat in test-fs-watchfile.js MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/14287 Reviewed-By: Joyee Cheung Reviewed-By: Rich Trott Reviewed-By: Michaël Zasso Reviewed-By: Gibson Fahnestock Reviewed-By: Benjamin Gruenbaum Reviewed-By: Colin Ihrig Reviewed-By: Tobias Nießen Reviewed-By: Gireesh Punathil Reviewed-By: Refael Ackermann Reviewed-By: James M Snell --- test/parallel/test-fs-watchfile.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test/parallel/test-fs-watchfile.js') 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); -- cgit v1.2.3