diff --git a/packages/glob/__tests__/internal-pattern.test.ts b/packages/glob/__tests__/internal-pattern.test.ts index bff9d48d..7ea4670b 100644 --- a/packages/glob/__tests__/internal-pattern.test.ts +++ b/packages/glob/__tests__/internal-pattern.test.ts @@ -350,12 +350,11 @@ describe('pattern', () => { describe('globEscape ReDos', () => { it('done in 1s', () => { - const attackString = '['.repeat(100000) + '\u0000' + const attackString = `${'['.repeat(100000)}\u0000` const startTime = performance.now() Pattern.globEscape(attackString) const endTime = performance.now() const timeTaken = endTime - startTime - console.log(`globEscape: ${timeTaken.toFixed(3)} ms`) expect(timeTaken).toBeLessThan(1000) }) })