diff options
author | Richard Lau <riclau@uk.ibm.com> | 2019-12-17 00:25:31 +0300 |
---|---|---|
committer | Richard Lau <riclau@uk.ibm.com> | 2019-12-18 17:23:49 +0300 |
commit | e23aebc684a45f725811211f9740bcee3bcdbe26 (patch) | |
tree | 934179ec5a67a51e60ecdb485fd15933a77a26dc /test | |
parent | eaf59754be421498287a7bf2471b83e629da1911 (diff) |
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>
Diffstat (limited to 'test')
-rw-r--r-- | test/es-module/test-esm-windows.js | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/test/es-module/test-esm-windows.js b/test/es-module/test-esm-windows.js index c4d9ff4cde2..76e016217b3 100644 --- a/test/es-module/test-esm-windows.js +++ b/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'); |