3
0
mirror of https://github.com/larvit/adf-codec.git synced 2026-11-12 11:48:29 +01:00

Give the 33-million-character line test a timeout past Bun's 5 s default

This commit is contained in:
2026-10-28 18:21:07 +01:00
committed by Lillem4n
parent ff44b6e195
commit 2b5c0571fc
+2 -1
View File
@@ -73,7 +73,8 @@ test('refuses text past V8\'s longest string', () => {
assert.equal(pastTheBound(result), true)
})
test('escapes more characters in a line than V8\'s Set holds', () => {
// Bun stops a test after 5 s by default, and this one writes and reads back a line of 33 million characters.
test('escapes more characters in a line than V8\'s Set holds', { timeout: 60000 }, () => {
const stars = '*'.repeat(2 ** 24 + 1)
assert.equal(markdown(adfToLosslessMarkdown(document(paragraph({ text: stars, type: 'text' })))), `${'\\*'.repeat(2 ** 24 + 1)}\n`)
})