You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To address this, I added a new test:e2e:alpinejs command that explicitly runs the tests for the alpinejs integration.
I also moved the contents of the existing test:e2e command into test:e2e:astro, and configured test:e2e to run both test:e2e:astro and test:e2e:alpinejs.
I also noticed that test-utils.ts file was still using .js as the file extension when detecting files, and another had an incorrect path to a test fixture, so I went ahead and corrected those as well.
Additionally, I updated the test assertions to use a more reliable approach, as the tests were occasionally showing as flaky in CI.
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.
This PR includes no changesets
When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types
rururux
changed the title
refactor(alpinejs): Fix test execution and remove unused code
refactor(alpinejs): Fix test execution and correct minor mistakes in test files
Apr 25, 2026
I noticed that running test:e2e:alpinejs in CI shows tests as flaky, so in commit 4b39995 I updated the assertion to make the tests pass more reliably.
It's weird that @astrojs/alpinejs uses a different test framework (playwright) compared to all other integrations like @astrojs/react and @astrojs/svelte (node:test).
Perhaps we should migrate @astrojs/alpinejs's tests from playwright to node:test, following the other integrations.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
test:e2ecommand totest:e2e:astrotest:e2e:alpinejscommandtest:e2eto run bothtest:e2e:astroandtest:e2e:alpinejspackages/integrations/alpinejs/playwright.config.js(because CI failed without this)Previously, the test files for

integrations/alpinejswere not being run correctly.The reason is that the alpinejs integration only contains e2e tests, and those files are not picked up by the
test:integrationscommand.You can see this in the CI logs of an already-merged pull request, searching for "alpinejs" returns only one hit:
https://github.com/withastro/astro/actions/runs/24900093515/job/72915439313
To address this, I added a new
test:e2e:alpinejscommand that explicitly runs the tests for the alpinejs integration.I also moved the contents of the existing
test:e2ecommand intotest:e2e:astro, and configuredtest:e2eto run bothtest:e2e:astroandtest:e2e:alpinejs.I also noticed that
test-utils.tsfile was still using.jsas the file extension when detecting files, and another had an incorrect path to a test fixture, so I went ahead and corrected those as well.Additionally, I updated the test assertions to use a more reliable approach, as the tests were occasionally showing as flaky in CI.
Testing
Green CI
Docs
N/A, This will not affect users