MCPcopy Create free account
hub / github.com/Snapchat/Valdi / doTest

Function doTest

valdi/vscode_debugger/src/test/breakpoints/breakpointsTest.ts:808–825  ·  view source on GitHub ↗
(r: TestRoot, run: (p: TestP, source: Dap.Source) => Promise<void>)

Source from the content-addressed store, hash-verified

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');

Callers 1

breakpointsTest.tsFile · 0.85

Calls 5

launchUrlAndLoadMethod · 0.80
assertLogMethod · 0.80
evaluateMethod · 0.65
runFunction · 0.50
waitForSourceMethod · 0.45

Tested by

no test coverage detected