From 8a2178c5f56e75ed5a12827e01001fe5c7e4e3fa Mon Sep 17 00:00:00 2001 From: Luigi Pinca Date: Wed, 20 Dec 2023 19:17:31 +0100 Subject: [PATCH] test: use tmpdir.refresh() in test-esm-loader-resolve-type.mjs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use `tmpdir.refresh()` in `test/es-module/test-esm-loader-resolve-type.mjs` so that the temporary directory is removed when the test exits. PR-URL: https://github.com/nodejs/node/pull/51206 Reviewed-By: Michaël Zasso Reviewed-By: Vinícius Lourenço Claro Cardoso --- test/es-module/test-esm-loader-resolve-type.mjs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/es-module/test-esm-loader-resolve-type.mjs b/test/es-module/test-esm-loader-resolve-type.mjs index 4c5e7aede8fccc..94f409490227af 100644 --- a/test/es-module/test-esm-loader-resolve-type.mjs +++ b/test/es-module/test-esm-loader-resolve-type.mjs @@ -5,6 +5,8 @@ import { deepStrictEqual } from 'node:assert'; import { mkdir, rm, cp } from 'node:fs/promises'; import { execPath } from 'node:process'; +tmpdir.refresh(); + const base = tmpdir.fileURL(`test-esm-loader-resolve-type-${(Math.random() * Date.now()).toFixed(0)}`); const moduleName = 'module-counter-by-type'; const moduleURL = new URL(`${base}/node_modules/${moduleName}`);