3
0
mirror of https://github.com/larvit/adf-codec.git synced 2026-11-19 06:35:44 +01:00

Answer auto-reviewer round 1: the README says to retry the engine-limit refusal once on JavaScriptCore, and the merged-text test says why it stays cheap

This commit is contained in:
2026-10-11 21:00:49 +02:00
committed by Lillem4n
parent 62d80a69b7
commit 1ab405fa74
2 changed files with 3 additions and 1 deletions
@@ -70,6 +70,7 @@ test('refuses what the document guard refuses, and nothing else', () => {
assert.match(portableDocument(document(paragraph(deepInline))), /^unsupported-nesting-depth at /)
})
// The merge throws at its concatenation, before any text is scanned, so no engine holds more than the one string.
test('refuses a paragraph whose merged text passes the engine\'s longest string', () => {
const long = 'a'.repeat(2 ** 28)
const merged = paragraph(...Array.from({ length: 9 }, () => text(long)))