Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,25 @@ export default mergeConfig(viteConfig, {
"dev/vitest/setupBrowser.ts",
],
include: REUSED_VISUAL_TESTS,
/*
* One tester iframe for the whole run, for the same reason the package's
* `visual` project sets it: Playwright's WebKit never releases a removed
* iframe's document, so vitest's per-file iframe churn leaves every
* finished file's realm behind — component library, all.css, fonts, last
* render — until the page dies mid-run (#3119). This harness reuses the
* same corpus on one browser, and it died at file 60 of 84 with
* `Browser connection was closed while running tests`.
*
* The shared realm suits it: setup.ts's first-wins `customElements.define`
* patch keeps the OLD flr-* registrations for the whole run, which is
* exactly one version per run anyway.
*/
isolate: false,
/*
* One page at a time. `browser.fileParallelism` is deprecated in vitest 4
* in favour of this top-level option.
*/
fileParallelism: false,
browser: {
...vitestBrowserTestConfig.browser,
// dev/vitest/setupBrowser.ts calls it, so it has to be registered here
Expand All @@ -37,7 +56,6 @@ export default mergeConfig(viteConfig, {
serveFontsLocally,
},
headless: true,
fileParallelism: false,
// HTML comparison, not pixels — failure screenshots would only pollute the
// reused tests' src/**/__screenshots__ dir.
screenshotFailures: false,
Expand Down
Loading