Skip to content

Commit 56188fe

Browse files
richardlauMylesBorins
authored andcommitted
test: use tmpdir.refresh() in test-esm-windows.js
Use `tmpdir.refresh()` in `test/es-module/test-esm-windows.js` so that the temporary directory is cleaned before use and when the test exits. PR-URL: #30997 Reviewed-By: Denys Otrishko <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent c10ee5d commit 56188fe

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

test/es-module/test-esm-windows.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,8 @@ const imp = (file) => {
1515
};
1616

1717
(async () => {
18-
const tmp = tmpdir.path;
19-
await fs.mkdir(tmp).catch(() => {});
20-
const rel = (file) => path.join(tmp, file);
18+
tmpdir.refresh();
19+
const rel = (file) => path.join(tmpdir.path, file);
2120

2221
{ // Load a single script
2322
const file = rel('con.mjs');

0 commit comments

Comments
 (0)