Skip to content

Commit ed7780a

Browse files
committed
fmt
1 parent 36603d5 commit ed7780a

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

test/redos.js

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,10 @@ import assert from 'assert'
33
import expand from '../index.js'
44

55
test('redos', function () {
6-
let str = "{a}" + ",".repeat(100000) + "\u0000";
7-
let startTime = performance.now();
8-
expand(str)
9-
let endTime = performance.now();
10-
let timeTaken = endTime - startTime;
11-
assert.ok(timeTaken < 1000, `Expected time (${timeTaken}ms) to be less than 1000ms`);
6+
const str = '{a}' + ','.repeat(100000) + '\u0000'
7+
const startTime = performance.now()
8+
expand(str)
9+
const endTime = performance.now()
10+
const timeTaken = endTime - startTime
11+
assert.ok(timeTaken < 1000, `Expected time (${timeTaken}ms) to be less than 1000ms`)
1212
})
13-
14-
15-

0 commit comments

Comments
 (0)