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 BridgeAR committed Jan 3, 2020
1 parent 7815d5f commit 3753f47
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions test/es-module/test-esm-windows.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down

0 comments on commit 3753f47

Please sign in to comment.