(r: TestRoot, run: (p: TestP, source: Dap.Source) => Promise<void>)
| 806 | |
| 807 | describe('hit count', () => { |
| 808 | const doTest = async (r: TestRoot, run: (p: TestP, source: Dap.Source) => Promise<void>) => { |
| 809 | const p = await r.launchUrlAndLoad('index.html'); |
| 810 | p.cdp.Runtime.evaluate({ |
| 811 | expression: ` |
| 812 | function foo() { |
| 813 | for (let i = 0; i < 10; i++) { |
| 814 | console.log(i); |
| 815 | console.log(i); |
| 816 | console.log(i); |
| 817 | } |
| 818 | } |
| 819 | `, |
| 820 | }); |
| 821 | const { source } = await p.waitForSource('eval'); |
| 822 | source.path = undefined; |
| 823 | await run(p, source); |
| 824 | p.assertLog(); |
| 825 | }; |
| 826 | |
| 827 | const waitForHit = async (p: TestP) => { |
| 828 | const { threadId: pageThreadId } = await p.dap.once('stopped'); |
no test coverage detected