mirror of https://github.com/nodejs/node.git
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: https://github.com/nodejs/node/pull/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>pull/30997/head
parent
eaf59754be
commit
e23aebc684
|
@ -14,9 +14,8 @@ const imp = (file) => {
|
|||
};
|
||||
|
||||
(async () => {
|
||||
const tmp = tmpdir.path;
|
||||
await fs.mkdir(tmp).catch(() => {});
|
||||
const rel = (file) => path.join(tmp, file);
|
||||
tmpdir.refresh();
|
||||
const rel = (file) => path.join(tmpdir.path, file);
|
||||
|
||||
{ // Load a single script
|
||||
const file = rel('con.mjs');
|
||||
|
|
Loading…
Reference in New Issue