diff --git a/test/es-module/test-esm-windows.js b/test/es-module/test-esm-windows.js index c4d9ff4cde2c95..76e016217b3ef8 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');