Skip to content

Commit a6f786d

Browse files
saurabhSiddhuMylesBorins
authored andcommitted
test: replacing fixture directory with temp
PR-URL: #24077 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent 6ce4ef3 commit a6f786d

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

test/parallel/test-fs-error-messages.js

+12-5
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,22 @@ const fixtures = require('../common/fixtures');
2525
const tmpdir = require('../common/tmpdir');
2626
const assert = require('assert');
2727
const fs = require('fs');
28+
const path = require('path');
2829

2930
tmpdir.refresh();
3031

31-
const nonexistentFile = fixtures.path('non-existent');
32-
const nonexistentDir = fixtures.path('non-existent', 'foo', 'bar');
33-
const existingFile = fixtures.path('exit.js');
34-
const existingFile2 = fixtures.path('a.js');
35-
const existingDir = tmpdir.path;
32+
33+
const nonexistentFile = path.join(tmpdir.path, 'non-existent');
34+
const nonexistentDir = path.join(tmpdir.path, 'non-existent', 'foo', 'bar');
35+
const existingFile = path.join(tmpdir.path, 'existingFile.js');
36+
const existingFile2 = path.join(tmpdir.path, 'existingFile2.js');
37+
const existingDir = path.join(tmpdir.path, 'dir');
3638
const existingDir2 = fixtures.path('keys');
39+
fs.mkdirSync(existingDir);
40+
fs.writeFileSync(existingFile, 'test', 'utf-8');
41+
fs.writeFileSync(existingFile2, 'test', 'utf-8');
42+
43+
3744
const { COPYFILE_EXCL } = fs.constants;
3845
const uv = process.binding('uv');
3946

0 commit comments

Comments
 (0)