summaryrefslogtreecommitdiffhomepage
path: root/src/features/markdown/logic
diff options
context:
space:
mode:
authorAdam Malczewski <[email protected]>2026-10-21 01:22:00 +0900
committerAdam Malczewski <[email protected]>2026-10-21 01:22:00 +0900
commit273b824d2784959bf89ee77cd8f5d0703b1211f7 (patch)
treea83016389cae46a1df9f7ea07a5b32efec8da36f /src/features/markdown/logic
parent85bcf6d031386c5dcf3435fe1a1f6b0abf4f9a61 (diff)
downloaddispatch-web-273b824d2784959bf89ee77cd8f5d0703b1211f7.tar.gz
dispatch-web-273b824d2784959bf89ee77cd8f5d0703b1211f7.zip
fix(review-7.5): harden counting tests and stub all store fetches
Diffstat (limited to 'src/features/markdown/logic')
-rw-r--r--src/features/markdown/logic/streaming-markdown.test.ts4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/features/markdown/logic/streaming-markdown.test.ts b/src/features/markdown/logic/streaming-markdown.test.ts
index f810579..931803b 100644
--- a/src/features/markdown/logic/streaming-markdown.test.ts
+++ b/src/features/markdown/logic/streaming-markdown.test.ts
@@ -240,6 +240,8 @@ describe("streaming-markdown corpus equivalence", () => {
});
describe("streaming-markdown performance fixture (counts, not wall-clock)", () => {
+ // Thousands of real parser/sanitizer calls contend with the unrestricted suite.
+ // This asserts operation counts, not speed; keep all counts and allow CPU load.
it("hljs calls and prefix mutations stay proportional to BLOCKS, not length × deltas", () => {
const spy = vi.spyOn(hljs, "highlight");
const state = createStreamingMarkdown();
@@ -282,7 +284,7 @@ describe("streaming-markdown performance fixture (counts, not wall-clock)", () =
expect(normalizeHtml(final.prefixHtml + final.tailHtml)).toBe(
normalizeHtml(renderMarkdown(doc, { streaming: true })),
);
- });
+ }, 20_000);
});
describe("markdown tail-pipeline exports", () => {