Skip to content

Commit b87ae6d

Browse files
richardlauBethGriggs
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 <shishugi@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent a2ac9d3 commit b87ae6d

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

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

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

1717
(async()=>{
18-
consttmp=tmpdir.path;
19-
awaitfs.mkdir(tmp).catch(()=>{});
20-
constrel=(file)=>path.join(tmp,file);
18+
tmpdir.refresh();
19+
constrel=(file)=>path.join(tmpdir.path,file);
2120

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

0 commit comments

Comments
 (0)