summaryrefslogtreecommitdiff
path: root/tests/node_compat/test/parallel/test-fs-write-file-invalid-path.js
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2024-06-11 12:41:44 +0100
committerGitHub <noreply@github.com>2024-06-11 11:41:44 +0000
commit6a356aff1380e79d67738c5b43aa2b5fee76600d (patch)
treebe4aadc62a523ff280820958a1a3829f1a18ca7d /tests/node_compat/test/parallel/test-fs-write-file-invalid-path.js
parent3d41b486da7dcba49c8a18b45425e356c329d986 (diff)
chore: sync up Node.js test files for v20.11.1 (#24066)
Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com>
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.js5
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 = '';