Skip to content

Commit 0bbe37e

Browse files
committed
fix: run every web-test-runner suite in one Gate slot
The root browser suite and the website and gallery suites each start a web-test-runner on its default port 8000. With the root suite in one Gate slot and the in-repo app suites in another, the two overlapped on a signoff run and the later one fetched its test modules from the wrong server (every test failed with "Failed to fetch dynamically imported module ... localhost:8000"). Two earlier runs missed it only by timing. The root browser suite and the in-repo app group now share one sequential slot, which costs no wall-clock because the e2e group is the floor, and framework-dev.md names the rule.
1 parent 4dc319b commit 0bbe37e

2 files changed

Lines changed: 46 additions & 38 deletions

File tree

‎framework-dev.md‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -183,9 +183,12 @@ one `Gate` group that runs THREE slots at once, longest first (six overloaded a
183183
blog in a real browser, the browser-test harness, the dev overlay, seed
184184
observability, morph, the form-submission run against a live website dev
185185
server via `scripts/ci-e2e-website.sh`, the two ui e2e), the Bun group (all 31
186-
proof scripts, then the matrix), the blog e2e served on Bun, the browser suite,
187-
the root `npm test`, the in-repo app typechecks and suites plus the website
188-
boot-check, the Conventions group (`webjs check` and `webjs doctor` per in-repo
186+
proof scripts, then the matrix), the blog e2e served on Bun, one slot holding the
187+
browser suite and then the in-repo app typechecks and suites plus the website
188+
boot-check (every suite that starts a web-test-runner binds its fixed port
189+
8000, so two in flight at once make the later one fetch its test modules from
190+
the wrong server; sequential in one slot costs no wall-clock), the root `npm
191+
test`, the Conventions group (`webjs check` and `webjs doctor` per in-repo
189192
app, the buildless-packages invariant, the em-dash scan), and the Postgres
190193
round-trip against a throwaway `postgres:16` container (`scripts/ci-postgres.sh`,
191194
which also installs the `pg` driver `--no-save` into the repo's own

‎package.json‎

Lines changed: 40 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -262,46 +262,51 @@
262262
]
263263
},
264264
{
265-
"title": "Browser (web-test-runner / Playwright)",
266-
"run": "npm run test:browser"
267-
},
268-
{
269-
"title": "Unit + integration (node --test)",
270-
"run": "npm test"
271-
},
272-
{
273-
"title": "In-repo app tests",
265+
"title": "Browser suites (one web-test-runner at a time)",
274266
"steps": [
275267
{
276-
"title": "website typecheck",
277-
"run": "npm run typecheck --workspace=@webjsdev/website"
278-
},
279-
{
280-
"title": "blog typecheck",
281-
"run": "npm run typecheck --workspace=@webjsdev/example-blog"
282-
},
283-
{
284-
"title": "gallery typecheck",
285-
"run": "npm run typecheck --workspace=@webjsdev/gallery"
286-
},
287-
{
288-
"title": "website tests (node + browser)",
289-
"run": "npm test --workspace=@webjsdev/website"
290-
},
291-
{
292-
"title": "blog tests (node)",
293-
"run": "npm test --workspace=@webjsdev/example-blog"
294-
},
295-
{
296-
"title": "gallery tests (node + browser)",
297-
"run": "npm test --workspace=@webjsdev/gallery"
298-
},
299-
{
300-
"title": "App boot-check on Node (website incl. /docs + /ui)",
301-
"run": "node test/bun/app-boot.mjs"
268+
"title": "Browser (web-test-runner / Playwright)",
269+
"run": "npm run test:browser"
270+
},
271+
{
272+
"title": "In-repo app tests",
273+
"steps": [
274+
{
275+
"title": "website typecheck",
276+
"run": "npm run typecheck --workspace=@webjsdev/website"
277+
},
278+
{
279+
"title": "blog typecheck",
280+
"run": "npm run typecheck --workspace=@webjsdev/example-blog"
281+
},
282+
{
283+
"title": "gallery typecheck",
284+
"run": "npm run typecheck --workspace=@webjsdev/gallery"
285+
},
286+
{
287+
"title": "website tests (node + browser)",
288+
"run": "npm test --workspace=@webjsdev/website"
289+
},
290+
{
291+
"title": "blog tests (node)",
292+
"run": "npm test --workspace=@webjsdev/example-blog"
293+
},
294+
{
295+
"title": "gallery tests (node + browser)",
296+
"run": "npm test --workspace=@webjsdev/gallery"
297+
},
298+
{
299+
"title": "App boot-check on Node (website incl. /docs + /ui)",
300+
"run": "node test/bun/app-boot.mjs"
301+
}
302+
]
302303
}
303304
]
304305
},
306+
{
307+
"title": "Unit + integration (node --test)",
308+
"run": "npm test"
309+
},
305310
{
306311
"title": "Conventions",
307312
"steps": [

0 commit comments

Comments
 (0)