(source: string)
| 607 | |
| 608 | it('takes a file of sixteen thousand items in the time its size asks for', () => { |
| 609 | const time = (source: string): number => { |
| 610 | let best = Infinity; |
| 611 | for (let round = 0; round < 3; round++) { |
| 612 | const started = performance.now(); |
| 613 | expect(splitObjcpp(source)!.items.length).toBeGreaterThan(1000); |
| 614 | best = Math.min(best, performance.now() - started); |
| 615 | } |
| 616 | return best; |
| 617 | }; |
| 618 | const small = time(bigFile(1024 * 1024).text); |
| 619 | const large = time(bigFile(4 * 1024 * 1024).text); |
| 620 | // Four times the size is about four times the time; the square would be sixteen. |
no test coverage detected