Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorRichard Lau <riclau@uk.ibm.com>2019-12-17 00:25:31 +0300
committerRichard Lau <riclau@uk.ibm.com>2019-12-18 17:23:49 +0300
commite23aebc684a45f725811211f9740bcee3bcdbe26 (patch)
tree934179ec5a67a51e60ecdb485fd15933a77a26dc /test
parenteaf59754be421498287a7bf2471b83e629da1911 (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.js5
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');