Skip to content

fix(e2e): the sw-node suite leaves subpath.spec.ts to its own subpath build - #543

Merged
arrzdev merged 1 commit into
mainfrom
fix/sw-node-skips-subpath
Nov 2, 2026
Merged

arrzdev merged 1 commit into
mainfrom
fix/sw-node-skips-subpath

Conversation

@arrzdev

@arrzdev arrzdev commented Nov 2, 2026

Copy link
Copy Markdown
Owner

pnpm --dir playground test:e2e:sw:all was always red: its last suite, sw-node, ran e2e-sw/subpath.spec.ts.

Root cause: a config match, not a node-server bug. subpath.spec.ts (added in 2670f4c) needs a render: "spa" build under --base /app/, served by e2e-sw/subpath-host.ts; it has its own config, playwright.sw-subpath.config.ts. When it landed, playwright.sw.config.ts and playwright.sw-spa.config.ts got subpath.spec.ts in their testIgnore; playwright.sw-node.config.ts did not. So sw-node ran it against an ssr build rooted at /, where every /app/ URL is outside the app. All 13 failures on main are in that spec; every other spec in sw-node passed.

Change: playwright.sw-node.config.ts adds subpath.spec.ts to testIgnore, the same way its siblings do. The spec still runs where it can pass, in test:e2e:sw:subpath.

Reproduce (main):

pnpm build && pnpm playground:setup
pnpm --dir playground test:e2e:sw:node
# 13 failed (all e2e-sw/subpath.spec.ts, chromium + webkit), 20 skipped, 45 passed

Verify (this branch):

pnpm --dir playground test:e2e:sw:all   # exit 0
# sw         47 passed, 19 skipped
# sw-spa     55 passed, 11 skipped
# sw-prompt   2 passed
# sw-subpath 13 passed, 1 skipped
# sw-node    45 passed, 19 skipped
pnpm --dir playground exec biome check playwright.sw-node.config.ts
pnpm --dir playground exec tsc --noEmit -p .

Tested on: Linux (WSL2), Node 22, chromium + webkit (Playwright's iPhone 13 device), every suite in test:e2e:sw:all.
Not tested: CI. No workflow runs sw-node or sw-subpath today, and this PR leaves the workflows alone.

@arrzdev
arrzdev marked this pull request as ready for review November 2, 2026 05:38
@arrzdev
arrzdev merged commit 0475441 into main Nov 2, 2026
4 checks passed
@arrzdev
arrzdev deleted the fix/sw-node-skips-subpath branch November 2, 2026 05:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant