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
playwright.config.js is the only executable JavaScript file at the repository
root that does not appear in the npm run test:unit:coverage report. docusaurus.config.js and sidebars.js are both reported at 100.00 / 100.00,
because tests/site-config.test.mjs imports them. Nothing imports playwright.config.js, so Node never instruments it and the file is invisible
to the coverage gate rather than merely uncovered by it.
Evidence
Unit:TZ=UTC node tests/tools/coverage-report.mjs at b54cf81
(npm run test:unit:coverage). playwright.config.js produces no row. Every
other source file under src/ and scripts/, plus docusaurus.config.js and sidebars.js, does. Reproduce with: npm ci && npm run test:unit:coverage | grep playwright — no output.
Limitation: the two sources cannot be combined — Playwright emits no
statement-level coverage for its own configuration module — so they are
reported separately above.
Why it matters
The config is not inert data; it branches on the environment at module scope,
and each branch silently changes how the end-to-end suite behaves:
E2E_PORT (default 3000) is interpolated into three separate places — use.baseURL, webServer.url, and webServer.command. If those ever drift
apart, Playwright waits on one URL while the server listens on another and the
whole suite times out at startup.
CI switches forbidOnly, retries, reporter, and webServer.reuseExistingServer simultaneously. A regression in the forbidOnly or reuseExistingServer branch is invisible locally and only
shows up as test.only silently narrowing a CI run, or as CI reusing a stale
server.
testDir is a hardcoded string (tests/e2e). If the spec directory is ever
moved or renamed, Playwright reports zero tests and exits successfully.
None of these are currently asserted anywhere.
Recommendation
Add tests/playwright-config.test.mjs that imports the config under controlled
environments, following the existing loadConfig(env) cache-busting pattern
already established in tests/site-config.test.mjs for docusaurus.config.js.
It should assert:
E2E_PORT unset yields http://localhost:3000 in use.baseURL, webServer.url, and webServer.command
E2E_PORT set threads the same custom port through all three
CI set gives forbidOnly: true, retries: 1, reporter: 'github', reuseExistingServer: false
an empty CI value is treated as not-CI (the !!/ternary boundary)
fullyParallel and trace: 'retain-on-failure' are set
exactly one project is declared and it carries the Desktop Chrome device
descriptor
testDir names a directory that exists and actually contains .spec.js
files
webServer.timeout is a positive, bounded number
That brings playwright.config.js into the report at 100.00 / 100.00, so the
existing npm run test:unit:coverage:check gate starts protecting it.
Scope
Single file, single PR. This does not touch tests/e2e/*.spec.js (#723, #729),
the shared sandbox helpers (#727), the coverage-report tool (#702, #719), or any scripts/ module claimed by #678, #680, #686, #688, or #693.
Finding
playwright.config.jsis the only executable JavaScript file at the repositoryroot that does not appear in the
npm run test:unit:coveragereport.docusaurus.config.jsandsidebars.jsare both reported at 100.00 / 100.00,because
tests/site-config.test.mjsimports them. Nothing importsplaywright.config.js, so Node never instruments it and the file is invisibleto the coverage gate rather than merely uncovered by it.
Evidence
TZ=UTC node tests/tools/coverage-report.mjsatb54cf81(
npm run test:unit:coverage).playwright.config.jsproduces no row. Everyother source file under
src/andscripts/, plusdocusaurus.config.jsandsidebars.js, does. Reproduce with:npm ci && npm run test:unit:coverage | grep playwright— no output.npm run test:e2erun, but no CI workflow invokestest:e2e([quality] Playwright e2e suite is never run in CI — tests/e2e/smoke.spec.js has no workflow #672), so nomachine-readable end-to-end coverage data exists for this revision. No claim
of missing end-to-end coverage is made here.
statement-level coverage for its own configuration module — so they are
reported separately above.
Why it matters
The config is not inert data; it branches on the environment at module scope,
and each branch silently changes how the end-to-end suite behaves:
E2E_PORT(default3000) is interpolated into three separate places —use.baseURL,webServer.url, andwebServer.command. If those ever driftapart, Playwright waits on one URL while the server listens on another and the
whole suite times out at startup.
CIswitchesforbidOnly,retries,reporter, andwebServer.reuseExistingServersimultaneously. A regression in theforbidOnlyorreuseExistingServerbranch is invisible locally and onlyshows up as
test.onlysilently narrowing a CI run, or as CI reusing a staleserver.
testDiris a hardcoded string (tests/e2e). If the spec directory is evermoved or renamed, Playwright reports zero tests and exits successfully.
None of these are currently asserted anywhere.
Recommendation
Add
tests/playwright-config.test.mjsthat imports the config under controlledenvironments, following the existing
loadConfig(env)cache-busting patternalready established in
tests/site-config.test.mjsfordocusaurus.config.js.It should assert:
E2E_PORTunset yieldshttp://localhost:3000inuse.baseURL,webServer.url, andwebServer.commandE2E_PORTset threads the same custom port through all threeCIunset givesforbidOnly: false,retries: 0,reporter: 'list',reuseExistingServer: trueCIset givesforbidOnly: true,retries: 1,reporter: 'github',reuseExistingServer: falseCIvalue is treated as not-CI (the!!/ternary boundary)fullyParallelandtrace: 'retain-on-failure'are setdescriptor
testDirnames a directory that exists and actually contains.spec.jsfiles
webServer.timeoutis a positive, bounded numberThat brings
playwright.config.jsinto the report at 100.00 / 100.00, so theexisting
npm run test:unit:coverage:checkgate starts protecting it.Scope
Single file, single PR. This does not touch
tests/e2e/*.spec.js(#723, #729),the shared sandbox helpers (#727), the coverage-report tool (#702, #719), or any
scripts/module claimed by #678, #680, #686, #688, or #693.Priority
Filed by quality agent (hold-gated mode)
🐝 Hive Agent:
quality| Instance:hosted-available-lke648397-260827-5n31| SHA:b54cf81— hive: agent=quality backend=copilot model=claude-opus-5 copilot=1.0.88