Skip to content

Commit 383ec7f

Browse files
committed
ugh
1 parent 2d775db commit 383ec7f

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

test/parallel/test-runner-run-watch.mjs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,19 @@ test('test has ran');`,
2727

2828
let fixturePaths;
2929

30-
function refresh() {
30+
async function refresh() {
31+
const { rm, readdir } = await import('node:fs/promises');
32+
console.log('refreshing', tmpdir.path);
33+
await rm(tmpdir.path, { maxRetries: 3, recursive: true, force: true });
34+
3135
tmpdir.refresh();
3236

3337
fixturePaths = Object.keys(fixtureContent)
3438
.reduce((acc, file) => ({ ...acc, [file]: tmpdir.resolve(file) }), {});
3539
Object.entries(fixtureContent)
3640
.forEach(([file, content]) => writeFileSync(fixturePaths[file], content));
41+
42+
console.log('contents of %s:', tmpdir.path, await readdir(tmpdir.path));
3743
}
3844

3945
const runner = join(import.meta.dirname, '..', 'fixtures', 'test-runner-watch.mjs');

0 commit comments

Comments
 (0)