(t, promise, error)
| 60 | export const assertSubprocessError = (t, subprocess, error) => assertPromiseError(t, subprocess, error); |
| 61 | |
| 62 | export const assertPromiseError = async (t, promise, error) => { |
| 63 | const thrownError = await t.throwsAsync(promise); |
| 64 | |
| 65 | if (isPlainObj(error) && error.cause !== undefined) { |
| 66 | t.is(thrownError.cause, error.cause); |
| 67 | } else { |
| 68 | t.is(thrownError, error); |
| 69 | } |
| 70 | |
| 71 | return thrownError; |
| 72 | }; |
| 73 | |
| 74 | export const getReadableSubprocess = (output = foobarString, options = {}) => execa('noop-fd.js', ['1', output], options); |
| 75 |
no outgoing calls
no test coverage detected
searching dependent graphs…