Skip to content

Commit 830ad07

Browse files
DennisSmolekclaude
andcommitted
test: surface captured console/page errors on readiness timeout
rtt times out on SwiftShader while heavier examples pass - likely a dead render loop (WGSL/pipeline error) rather than slowness. The harness was swallowing the page errors on timeout; now they are in the failure message. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent c6104c1 commit 830ad07

1 file changed

Lines changed: 13 additions & 3 deletions

File tree

tests/smoke.spec.ts

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,19 @@ for (const { slug, ...meta } of examples) {
3232
// <ReadinessSignal> inside DemoHelpers). Poll instead of sleeping. CI gets a
3333
// bigger budget: SwiftShader renders heavy examples at ~1 fps, so settle frames
3434
// cost real wall-clock there (verified: 30 instances + blur blew 60s twice).
35-
await page.waitForFunction(() => window.__exampleReady === true, undefined, {
36-
timeout: process.env.CI ? 180_000 : 60_000,
37-
})
35+
try {
36+
await page.waitForFunction(() => window.__exampleReady === true, undefined, {
37+
timeout: process.env.CI ? 180_000 : 60_000,
38+
})
39+
} catch (cause) {
40+
// Readiness timeouts are usually a dead render loop, not slowness — surface
41+
// everything the page said so CI logs are diagnosable without an artifact dig.
42+
throw new Error(
43+
`readiness timeout for ${slug}; page reported ${errors.length} error(s):\n` +
44+
(errors.join('\n') || '(no console/page errors captured)'),
45+
{ cause },
46+
)
47+
}
3848

3949
// Real webgpu context, not a WebGL2 fallback: getContext returns the existing
4050
// context only if the canvas was created with the same type.

0 commit comments

Comments
 (0)