Skip to content

fix(test): ensure removeDir is properly awaited#16624

Merged
ematipico merged 1 commit into
withastro:mainfrom
rururux:possible-flaky-image-test
May 6, 2026
Merged

fix(test): ensure removeDir is properly awaited#16624
ematipico merged 1 commit into
withastro:mainfrom
rururux:possible-flaky-image-test

Conversation

@rururux
Copy link
Copy Markdown
Member

@rururux rururux commented May 6, 2026

Changes

Some tests in core-image.test.ts have been flaky in Astro's CI.
https://github.com/withastro/astro/actions/runs/25425893932/job/74579340641?pr=16579
https://github.com/withastro/astro/actions/runs/25407064617/job/74520525804?pr=16614

After investigating, I found that the removeDir function, which is used to clean up the cache directory before tests, was not being awaited despite returning a Promise.

This PR adds the missing await to address the potential race condition.

Testing

Green CI

Docs

N/A

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 6, 2026

⚠️ No Changeset found

Latest commit: ad2eae1

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions github-actions Bot added the pkg: astro Related to the core `astro` package (scope) label May 6, 2026
@ematipico
Copy link
Copy Markdown
Member

🤞

@rururux
Copy link
Copy Markdown
Member Author

rururux commented May 6, 2026

✅️

@ematipico ematipico merged commit 08df70e into withastro:main May 6, 2026
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pkg: astro Related to the core `astro` package (scope)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants