({ numberOfSuites, testsPerSuite, testType, concurrency })
| 17 | }); |
| 18 | |
| 19 | async function run({ numberOfSuites, testsPerSuite, testType, concurrency }) { |
| 20 | concurrency = concurrency === 'yes'; |
| 21 | |
| 22 | // eslint-disable-next-line no-unused-vars |
| 23 | let avoidV8Optimization; |
| 24 | |
| 25 | switch (testType) { |
| 26 | case 'sync': { |
| 27 | for (let i = 0; i < numberOfSuites; i++) { |
| 28 | describe(`${i}`, { concurrency }, () => { |
| 29 | for (let j = 0; j < testsPerSuite; j++) { |
| 30 | it(`${j}`, () => { |
| 31 | avoidV8Optimization = i; |
| 32 | }); |
| 33 | } |
| 34 | }); |
| 35 | } |
| 36 | |
| 37 | break; |
| 38 | } |
| 39 | |
| 40 | case 'async': { |
| 41 | for (let i = 0; i < numberOfSuites; i++) { |
| 42 | describe(`${i}`, { concurrency }, () => { |
| 43 | for (let j = 0; j < testsPerSuite; j++) { |
| 44 | it(`${j}`, async () => { |
| 45 | avoidV8Optimization = i; |
| 46 | }); |
| 47 | } |
| 48 | }); |
| 49 | } |
| 50 | |
| 51 | break; |
| 52 | } |
| 53 | } |
| 54 | |
| 55 | await finished(reporter); |
| 56 | |
| 57 | return numberOfSuites * testsPerSuite; |
| 58 | } |
| 59 | |
| 60 | function main(params) { |
| 61 | bench.start(); |
no test coverage detected