TypeScript
test(web): fix the workflow script test that times out on busy CI runners (#21699)
shivam2532e64099a2
diff --git a/apps/web/src/components/chat/WorkflowOpeningBlock.browser.test.tsx b/apps/web/src/components/chat/WorkflowOpeningBlock.browser.test.tsxindex 78abe0651ba..e9ac0d4dca2 100644--- a/apps/web/src/components/chat/WorkflowOpeningBlock.browser.test.tsx+++ b/apps/web/src/components/chat/WorkflowOpeningBlock.browser.test.tsx@@ -22,6 +22,16 @@ vi.mock(import("../../state/server"), async (original) => {serverEnvironment: { ...actual.serverEnvironment, configValueAtom: (() => noConfig) as never },};});+// Loading the real Shiki WASM and grammar can take seconds on a busy runner; the block only+// needs to hand its script to the markdown code block that highlights it.+vi.mock(import("../../lib/syntaxHighlighting"), async (original) => ({+ ...(await original()),+ getSyntaxHighlighterPromise: async () =>+ ({+ codeToHtml: (code: string) =>+ Object.assign(document.createElement("pre"), { textContent: code }).outerHTML,+ }) as never,+}));const SHORT_SCRIPT ="export const meta = { name: 'repo-check' }\nagent('Run SCRIPTONLY with Bash')";