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 <targos@protonmail.com>
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
  • Loading branch information
lpinca authored and RafaelGSS committed Jan 2, 2024
1 parent 7e9a0b1 commit 8a2178c
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 8a2178c

Please sign in to comment.