Skip to content

Commit

Permalink
test: use tmpdir.refresh() in test-esm-windows.js
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
richardlau authored and BethGriggs committed Feb 6, 2020
1 parent a2ac9d3 commit b87ae6d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions test/es-module/test-esm-windows.js
Expand Up @@ -15,9 +15,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');
Expand Down

0 comments on commit b87ae6d

Please sign in to comment.