We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 36603d5 commit ed7780aCopy full SHA for ed7780a
test/redos.js
@@ -3,13 +3,10 @@ import assert from 'assert'
3
import expand from '../index.js'
4
5
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`);
+ const str = '{a}' + ','.repeat(100000) + '\u0000'
+ const startTime = performance.now()
+ expand(str)
+ const endTime = performance.now()
+ const timeTaken = endTime - startTime
+ assert.ok(timeTaken < 1000, `Expected time (${timeTaken}ms) to be less than 1000ms`)
12
})
13
-
14
15
0 commit comments