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

Function assertParses

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

Source from the content-addressed store, hash-verified

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

Callers 1

Calls 2

fakeChildProcessFunction · 0.85
restoreMethod · 0.80

Tested by

no test coverage detected