test: speed up CI and harden the suite

This commit is contained in:
chengyongru
2026-07-15 00:18:37 +08:00
committed by chengyongru
parent 06f47fa540
commit 2116e32013
33 changed files with 453 additions and 240 deletions
@@ -40,7 +40,13 @@ describe("DiffSyntaxHighlight with Prism", () => {
</ThemeProvider>,
);
const highlighted = await screen.findByTestId("syntax-highlighted-diff-hunk");
// Full-suite workers can keep the first Prism grammar import busy for more
// than Testing Library's one-second default, especially on Windows.
const highlighted = await screen.findByTestId(
"syntax-highlighted-diff-hunk",
{},
{ timeout: 10_000 },
);
await waitFor(
() => {
const tokens = highlighted.querySelectorAll<HTMLElement>(