Skip to content

Commit 8835196

Browse files
saurabhSiddhuBridgeAR
authored andcommitted
test: replacing fixture directory with temp
PR-URL: #24077 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent 115c57a commit 8835196

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
@@ -26,15 +26,22 @@ const fixtures = require('../common/fixtures');
2626
const tmpdir = require('../common/tmpdir');
2727
const assert = require('assert');
2828
const fs = require('fs');
29+
const path = require('path');
2930

3031
tmpdir.refresh();
3132

32-
const nonexistentFile = fixtures.path('non-existent');
33-
const nonexistentDir = fixtures.path('non-existent', 'foo', 'bar');
34-
const existingFile = fixtures.path('exit.js');
35-
const existingFile2 = fixtures.path('a.js');
36-
const existingDir = tmpdir.path;
33+
34+
const nonexistentFile = path.join(tmpdir.path, 'non-existent');
35+
const nonexistentDir = path.join(tmpdir.path, 'non-existent', 'foo', 'bar');
36+
const existingFile = path.join(tmpdir.path, 'existingFile.js');
37+
const existingFile2 = path.join(tmpdir.path, 'existingFile2.js');
38+
const existingDir = path.join(tmpdir.path, 'dir');
3739
const existingDir2 = fixtures.path('keys');
40+
fs.mkdirSync(existingDir);
41+
fs.writeFileSync(existingFile, 'test', 'utf-8');
42+
fs.writeFileSync(existingFile2, 'test', 'utf-8');
43+
44+
3845
const { COPYFILE_EXCL } = fs.constants;
3946
const { internalBinding } = require('internal/test/binding');
4047
const {

0 commit comments

Comments
 (0)