diff --git a/tests/parser.test.ts b/tests/parser.test.ts index d607431..8fcfca1 100644 --- a/tests/parser.test.ts +++ b/tests/parser.test.ts @@ -908,10 +908,10 @@ describe('parseMarkdown - v0.1.15 registerBlockHandler', () => { describe('parseMarkdown - 覆盖率:渲染缓存淘汰', () => { test('缓存超过上限触发 FIFO 淘汰', () => { - // MAX_CACHE_SIZE = 300,填充 301 个不同文本触发淘汰 + // MAX_CACHE_SIZE = 300,填充 301 个极短文本触发淘汰(避免 CI 超时) + const short = 'x'; for (let i = 0; i < 301; i++) { - const text = `text ${i} **bold**`; - parseMarkdown(text); + parseMarkdown(short + i); } // 不应抛错,且至少有一次淘汰发生 expect(true).toBe(true);