refactor(astro): migrate astro-island-hydration-error e2e test to typescript#16647
Open
aru-dev-ac wants to merge 3 commits into
Open
refactor(astro): migrate astro-island-hydration-error e2e test to typescript#16647aru-dev-ac wants to merge 3 commits into
aru-dev-ac wants to merge 3 commits into
Conversation
…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.
|
…-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.
…e2e-test-to-typescript
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
packages/astro/e2e/astro-island-hydration-error.test.jsto.test.tsand adds minimal type annotations to align with the e2e test convention established in refactor(astro): migrate e2e tests to typescript #16402..jsconvention. It is the only remaining.test.jsfile inpackages/astro/e2e/.playwright.config.js(which usestestMatch: 'e2e/*.test.ts'), so its two regression tests forastro:hydration-errorrecovery (added in fix(astro): recover island hydration from transient import failures #16412) now actually execute in CI. They were silently skipped before this rename.Testing
pnpm exec tsc --noEmit -p tsconfig.test.jsonpasses against the converted file.gitrecognises the change as a rename (83% similarity).Window.__hydrationErrorEventstyping follows the samedeclare global { interface Window {...} }pattern already used bye2e/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.