mirror of
https://github.com/larvit/adf-codec.git
synced 2026-11-18 22:25: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:
@@ -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)))
|
||||
|
||||
Reference in New Issue
Block a user