diff options
Diffstat (limited to 'tests/node_compat/test/parallel/test-fs-write-file-invalid-path.js')
-rw-r--r-- | tests/node_compat/test/parallel/test-fs-write-file-invalid-path.js | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/node_compat/test/parallel/test-fs-write-file-invalid-path.js b/tests/node_compat/test/parallel/test-fs-write-file-invalid-path.js index cec74e7cc..063f3e491 100644 --- a/tests/node_compat/test/parallel/test-fs-write-file-invalid-path.js +++ b/tests/node_compat/test/parallel/test-fs-write-file-invalid-path.js @@ -10,7 +10,6 @@ const common = require('../common'); const assert = require('assert'); const fs = require('fs'); -const path = require('path'); if (!common.isWindows) common.skip('This test is for Windows only.'); @@ -25,7 +24,7 @@ const DATA_VALUE = 'hello'; const RESERVED_CHARACTERS = '<>"|?*'; [...RESERVED_CHARACTERS].forEach((ch) => { - const pathname = path.join(tmpdir.path, `somefile_${ch}`); + const pathname = tmpdir.resolve(`somefile_${ch}`); assert.throws( () => { fs.writeFileSync(pathname, DATA_VALUE); @@ -36,7 +35,7 @@ const RESERVED_CHARACTERS = '<>"|?*'; // Test for ':' (NTFS data streams). // Refs: https://msdn.microsoft.com/en-us/library/windows/desktop/bb540537.aspx -const pathname = path.join(tmpdir.path, 'foo:bar'); +const pathname = tmpdir.resolve('foo:bar'); fs.writeFileSync(pathname, DATA_VALUE); let content = ''; |