(tree: IProcessTree, input: string, expected: IProcess[])
| 24 | }; |
| 25 | |
| 26 | const 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. |
no test coverage detected