Skip to content

Commit 4372185

Browse files
committed
test: fix builds
A former commit changed the tmpDir behavior and that broke this test. PR-URL: #18500 Refs: bf6ce47 Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
1 parent 39dc947 commit 4372185

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

test/parallel/test-fs-readfile.js

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,28 +4,29 @@ const common = require('../common');
44
// This test ensures that fs.readFile correctly returns the
55
// contents of varying-sized files.
66

7+
const tmpdir = require('../../test/common/tmpdir');
78
const assert = require('assert');
89
const fs = require('fs');
910
const path = require('path');
1011

1112
const prefix = `.removeme-fs-readfile-${process.pid}`;
1213

13-
common.refreshTmpDir();
14+
tmpdir.refresh();
1415

1516
const fileInfo = [
16-
{ name: path.join(common.tmpDir, `${prefix}-1K.txt`),
17+
{ name: path.join(tmpdir.path, `${prefix}-1K.txt`),
1718
len: 1024,
1819
},
19-
{ name: path.join(common.tmpDir, `${prefix}-64K.txt`),
20+
{ name: path.join(tmpdir.path, `${prefix}-64K.txt`),
2021
len: 64 * 1024,
2122
},
22-
{ name: path.join(common.tmpDir, `${prefix}-64KLessOne.txt`),
23+
{ name: path.join(tmpdir.path, `${prefix}-64KLessOne.txt`),
2324
len: (64 * 1024) - 1,
2425
},
25-
{ name: path.join(common.tmpDir, `${prefix}-1M.txt`),
26+
{ name: path.join(tmpdir.path, `${prefix}-1M.txt`),
2627
len: 1 * 1024 * 1024,
2728
},
28-
{ name: path.join(common.tmpDir, `${prefix}-1MPlusOne.txt`),
29+
{ name: path.join(tmpdir.path, `${prefix}-1MPlusOne.txt`),
2930
len: (1 * 1024 * 1024) + 1,
3031
},
3132
];

0 commit comments

Comments
 (0)