fix: give the Ace-worker story a budget that can outlast a loaded machine
`JsonObjectInput > Annotates The Offending Line` waits for Ace's JSON worker to produce gutter annotations. The worker starts out of process and debounces its result, so the story already used an explicit `waitFor` — but it asked for 5000ms while the storybook vitest project set no `testTimeout` at all, leaving it on vitest's 5000ms default. The wait could therefore never win: the test was killed at exactly the moment its budget expired, and on a loaded machine that is what happened, reporting `expected 0 to be greater than 0`. Raise the project's `testTimeout` to 15s and the story's own wait to 10s, so the wait has room to report what it actually saw. Neither loosens an assertion — a story that blows 15s has genuinely failed, and a worker that never starts still fails, just later. Closes #2292 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XtdD6rzc1ddT28ZNE9wUjV Signed-off-by: cliffhall <cliff@futurescale.com>
This commit is contained in:
parent
ff0f5d28cd
commit
16a743f895
1 changed files with 16 additions and 3 deletions
|
|
@ -375,6 +375,16 @@ export default defineConfig(({ command }) => {
|
|||
],
|
||||
test: {
|
||||
name: "storybook",
|
||||
// Vitest's default is 5000ms, which is the whole budget a play
|
||||
// function gets — including work that is genuinely slow rather than
|
||||
// racy. `JsonObjectInput`'s "Annotates The Offending Line" waits on
|
||||
// Ace's JSON worker, which starts out of process and debounces its
|
||||
// result; its own `waitFor` asked for 5000ms and so could never win
|
||||
// against the per-test ceiling, and it lost on a loaded machine
|
||||
// (#2292). A larger ceiling does not hide a defect here: a story
|
||||
// that blows 15s has genuinely failed, and every assertion stays as
|
||||
// strict as it was.
|
||||
testTimeout: 15000,
|
||||
browser: {
|
||||
enabled: true,
|
||||
headless: true,
|
||||
|
|
|
|||
Loading…
Reference in a new issue