Skip to content

refactor(astro): migrate astro-island-hydration-error e2e test to typescript#16647

Open
aru-dev-ac wants to merge 3 commits into
withastro:mainfrom
aru-dev-ac:fix/migrate-orphan-e2e-test-to-typescript
Open

refactor(astro): migrate astro-island-hydration-error e2e test to typescript#16647
aru-dev-ac wants to merge 3 commits into
withastro:mainfrom
aru-dev-ac:fix/migrate-orphan-e2e-test-to-typescript

Conversation

@aru-dev-ac
Copy link
Copy Markdown

Changes

Testing

  • pnpm exec tsc --noEmit -p tsconfig.test.json passes against the converted file.
  • The diff is a near-mechanical port of the existing test (12 insertions / 6 deletions), preserving identical test semantics. git recognises the change as a rename (83% similarity).
  • The Window.__hydrationErrorEvents typing follows the same declare global { interface Window {...} } pattern already used by e2e/view-transitions.test.ts.

Docs

No docs changes required — internal test refactor with no public-API surface.

No changeset added — internal-only test file rename, no published-package behaviour changes.

…escript

Aligns this file with the e2e test convention established in withastro#16402,
which migrated all e2e tests to typescript. This file was added later
in withastro#16412 and used the prior .js convention.

Side effect: the file is now matched by playwright.config.js
(testMatch: 'e2e/*.test.ts'), so its hydration-error regression tests
now run in CI.
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 7, 2026

⚠️ No Changeset found

Latest commit: d86dd45

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 7, 2026
aru-dev-ac added 2 commits May 7, 2026 17:17
…-regexp-exec

The TS-specific @typescript-eslint/prefer-regexp-exec rule treats
String.prototype.match as an error (the .js variant of the rule is
only a warning), so the migrated test file failed CI lint. Switching
to RegExp#exec preserves the existing semantics — both APIs return
the same RegExpExecArray for a single match — and matches the style
used throughout packages/astro/e2e.
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.

1 participant