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

Function evaluate

valdi/vscode_debugger/src/test/node/node-runtime.test.ts:30–41  ·  view source on GitHub ↗
(handle: NodeTestHandle, expression: string)

Source from the content-addressed store, hash-verified

28 }
29
30 async function evaluate(handle: NodeTestHandle, expression: string) {
31 handle.load();
32 const { threadId } = handle.log(await handle.dap.once('stopped'));
33 const stack = await handle.dap.stackTrace({ threadId });
34 await handle.logger.evaluateAndLog(expression, {
35 params: {
36 frameId: stack.stackFrames[0].id,
37 },
38 });
39
40 handle.assertLog();
41 }
42
43 function assertSkipFiles(expectedStacktrace: string) {
44 const stackframes = expectedStacktrace.split('\n').splice(-1, 1); // removing last empty element

Callers 1

Calls 6

evaluateAndLogMethod · 0.80
assertLogMethod · 0.80
loadMethod · 0.65
logMethod · 0.65
onceMethod · 0.65
stackTraceMethod · 0.65

Tested by

no test coverage detected