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

Function assertParses

src/test/node/process-tree.test.ts:27–35  ·  view source on GitHub ↗
(tree: IProcessTree, input: string, expected: IProcess[])

Source from the content-addressed store, hash-verified

25};
26
27const assertParses = async (tree: IProcessTree, input: string, expected: IProcess[]) => {
28 const stubbed = stub(tree, 'createProcess' as any).returns(fakeChildProcess(input));
29 try {
30 const result = await tree.lookup<IProcess[]>((entry, acc) => [...acc, entry], []);
31 expect(result).to.deep.equal(expected);
32 } finally {
33 stubbed.restore();
34 }
35};
36
37// These tests are a handful of samples taken by manually running the process
38// tree on given platforms.

Callers 1

Calls 1

fakeChildProcessFunction · 0.85

Tested by

no test coverage detected