MCPcopy
hub / github.com/microsoft/vscode-js-debug / doTest

Function doTest

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

Source from the content-addressed store, hash-verified

946
947 describe('hit count', () => {
948 const doTest = async (r: TestRoot, run: (p: TestP, source: Dap.Source) => Promise<void>) => {
949 const p = await r.launchUrlAndLoad('index.html');
950 p.evaluate(`
951 function foo() {
952 for (let i = 0; i < 10; i++) {
953 console.log(i);
954 console.log(i);
955 console.log(i);
956 }
957 }
958 `);
959 const { source } = await p.waitForSource('eval');
960 source.path = undefined;
961 await run(p, source);
962 p.assertLog();
963 };
964
965 const waitForHit = async (p: TestP) => {
966 const { threadId: pageThreadId } = await p.dap.once('stopped');

Callers 1

breakpointsTest.tsFile · 0.70

Calls 5

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

Tested by

no test coverage detected