Skip to content

Commit 4874af2

Browse files
committed
Avoid racing Astro middleware cleanup with dev exit hooks
1 parent 04169cf commit 4874af2

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎packages/void/test/integration/astro.test.ts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ describe('playground/astro dev', () => {
4242
) {
4343
return;
4444
}
45-
rmSync(middleware);
45+
// The dev server's exit hook can remove it between the read and cleanup.
46+
rmSync(middleware, { force: true });
4647
const gitignore = join(root, '.gitignore');
4748
writeFileSync(
4849
gitignore,

0 commit comments

Comments
 (0)