From fba535b5ac6483ff5a347cd3ce4e9643d10387c2 Mon Sep 17 00:00:00 2001 From: mmmsssttt404 <931121963@qq.com> Date: Tue, 13 May 2025 16:39:02 +0800 Subject: [PATCH] Update internal-pattern.test.ts --- packages/glob/__tests__/internal-pattern.test.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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) }) })