Skip to content

Commit

Permalink
test: use tmpdir.refresh() in test-esm-loader-resolve-type.mjs
Browse files Browse the repository at this point in the history
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: #51206
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Vinícius Lourenço Claro Cardoso <[email protected]>
  • Loading branch information
lpinca authored and richardlau committed Mar 25, 2024
1 parent 8f2d982 commit 996cef5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/es-module/test-esm-loader-resolve-type.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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}`);
Expand Down

0 comments on commit 996cef5

Please sign in to comment.