Skip to content

Commit 2532e64

Browse files
shivamhwpPR Batch Testerclaude
authored
test(web): fix the workflow script test that times out on busy CI runners (#21699)
Co-authored-by: PR Batch Tester <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
1 parent f5c1142 commit 2532e64

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

‎apps/web/src/components/chat/WorkflowOpeningBlock.browser.test.tsx‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,16 @@ vi.mock(import("../../state/server"), async (original) => {
2222
serverEnvironment: { ...actual.serverEnvironment, configValueAtom: (() => noConfig) as never },
2323
};
2424
});
25+
// Loading the real Shiki WASM and grammar can take seconds on a busy runner; the block only
26+
// needs to hand its script to the markdown code block that highlights it.
27+
vi.mock(import("../../lib/syntaxHighlighting"), async (original) => ({
28+
...(await original()),
29+
getSyntaxHighlighterPromise: async () =>
30+
({
31+
codeToHtml: (code: string) =>
32+
Object.assign(document.createElement("pre"), { textContent: code }).outerHTML,
33+
}) as never,
34+
}));
2535

2636
const SHORT_SCRIPT =
2737
"export const meta = { name: 'repo-check' }\nagent('Run SCRIPTONLY with Bash')";

0 commit comments

Comments
 (0)