Skip to content

Commit 256a428

Browse files
committed
Fixes how tests access tmpdir
1 parent ac9d869 commit 256a428

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

test/es-module/test-esm-package-map.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ describe('ESM: --experimental-package-map', () => {
100100
'--input-type=module',
101101
'--eval',
102102
`import dep from 'dep-a'; console.log(dep);`,
103-
], { cwd: '/tmp' }); // Not in any mapped package
103+
], { cwd: tmpdir.path }); // Not in any mapped package
104104

105105
assert.match(stderr, /ERR_PACKAGE_MAP_EXTERNAL_FILE/);
106106
assert.notStrictEqual(code, 0, stderr);

test/parallel/test-require-package-map.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ describe('CJS: --experimental-package-map', { concurrency: !process.env.TEST_PAR
105105
'-e',
106106
`require('dep-a');`,
107107
], {
108-
cwd: '/tmp',
108+
cwd: tmpdir.path,
109109
encoding: 'utf8',
110110
});
111111

0 commit comments

Comments
 (0)