mirror of
https://github.com/nodejs/node.git
synced 2024-11-21 10:59:27 +00:00
test: use tmpdir.refresh() in test-esm-loader-resolve-type.mjs
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 <targos@protonmail.com> Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
This commit is contained in:
parent
0390a1de66
commit
40715481bf
@ -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}`);
|
||||
|
Loading…
Reference in New Issue
Block a user