diff --git a/test/es-module/test-esm-windows.js b/test/es-module/test-esm-windows.js index 64ba1249a76c06..44af65d6a4e031 100644 --- a/test/es-module/test-esm-windows.js +++ b/test/es-module/test-esm-windows.js @@ -15,9 +15,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');