Skip to content

Build your personal knowledge base with Trilium Notes

test(share): loosen the wall-clock budget on the #9717 large-code-note guard

Elian Doran1f39bd0dc72a
diff --git a/apps/server/src/share/content_renderer.spec.ts b/apps/server/src/share/content_renderer.spec.ts
index 38939794ef..fa49b8a8ea 100644
--- a/apps/server/src/share/content_renderer.spec.ts
+++ b/apps/server/src/share/content_renderer.spec.ts
@@ -155,7 +155,9 @@ describe("content_renderer", () => {
const result = getContent(note);
const elapsed = Date.now() - start;
- expect(elapsed).toBeLessThan(2000);
+ // Generous budget: the pre-fix path was effectively unbounded, and CI runs this
+ // under V8 coverage with several forked workers, where 2s was at the noise floor.
+ expect(elapsed).toBeLessThan(15_000);
if (typeof result.content !== "string") throw new Error("expected string content");
// The code is escaped, not re-parsed into markup, and not highlighted (over the limit).
expect(result.content).toContain("<Map<string");