Skip to content

Commit c5f7706

Browse files
authored
test(timing): retry flaky test and increase threshold (#552)
1 parent 589707f commit c5f7706

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/__tests__/parse.spec.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -440,6 +440,7 @@ describe('Cookie.parse', () => {
440440
},
441441
])(
442442
'Cookie.parse("$prefix $postfix") should not take significantly longer to run than Cookie.parse("$prefix<TOO MANY SPACES>$postfix")',
443+
{ retry: 3 },
443444
({ prefix, postfix, parseOptions = {} }) => {
444445
const shortVersion = `${prefix} ${postfix}`
445446
const startShortVersionParse = performance.now()
@@ -454,7 +455,7 @@ describe('Cookie.parse', () => {
454455
const ratio =
455456
(endLongVersionParse - startLongVersionParse) /
456457
(endShortVersionParse - startShortVersionParse)
457-
expect(ratio).toBeLessThan(250) // if broken this ratio goes 2000-4000x higher
458+
expect(ratio).toBeLessThan(300) // if broken this ratio goes 2000-4000x higher
458459
},
459460
)
460461
})

0 commit comments

Comments
 (0)