Skip to content
Permalink
Browse files

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>
  • Loading branch information
richardlau authored and BridgeAR committed Dec 16, 2019
1 parent 7815d5f commit 3753f47677853f1c51955530d125d13929c48802
Showing with 2 additions and 3 deletions.
  1. +2 −3 test/es-module/test-esm-windows.js
@@ -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');

0 comments on commit 3753f47

Please sign in to comment.
You can’t perform that action at this time.