Skip to content

Commit a6f786d

Browse files
saurabhSiddhuMylesBorins
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 6ce4ef3 commit a6f786d

1 file changed

Lines changed: 12 additions & 5 deletions

File tree

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

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,22 @@ const fixtures = require('../common/fixtures');
2525
consttmpdir=require('../common/tmpdir');
2626
constassert=require('assert');
2727
constfs=require('fs');
28+
constpath=require('path');
2829

2930
tmpdir.refresh();
3031

31-
constnonexistentFile=fixtures.path('non-existent');
32-
constnonexistentDir=fixtures.path('non-existent','foo','bar');
33-
constexistingFile=fixtures.path('exit.js');
34-
constexistingFile2=fixtures.path('a.js');
35-
constexistingDir=tmpdir.path;
32+
33+
constnonexistentFile=path.join(tmpdir.path,'non-existent');
34+
constnonexistentDir=path.join(tmpdir.path,'non-existent','foo','bar');
35+
constexistingFile=path.join(tmpdir.path,'existingFile.js');
36+
constexistingFile2=path.join(tmpdir.path,'existingFile2.js');
37+
constexistingDir=path.join(tmpdir.path,'dir');
3638
constexistingDir2=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
constuv=process.binding('uv');
3946

0 commit comments

Comments
 (0)