(t, type, execaMethod, getSubprocess)
| 10 | setFixtureDirectory(); |
| 11 | |
| 12 | const assertProcessError = async (t, type, execaMethod, getSubprocess) => { |
| 13 | const cause = new Error(foobarString); |
| 14 | const transform = generatorsMap[type].throwing(cause)(); |
| 15 | const error = execaMethod === execa |
| 16 | ? await t.throwsAsync(getSubprocess(transform)) |
| 17 | : t.throws(() => { |
| 18 | getSubprocess(transform); |
| 19 | }); |
| 20 | t.is(error.cause, cause); |
| 21 | }; |
| 22 | |
| 23 | const testThrowingGenerator = async (t, type, final, execaMethod) => { |
| 24 | await assertProcessError(t, type, execaMethod, transform => execaMethod('noop.js', { |
no test coverage detected
searching dependent graphs…