Skip to content

Commit

Permalink
Fix test for Node >= 12.6.0 (#348)
Browse files Browse the repository at this point in the history
  • Loading branch information
ehmicky authored and sindresorhus committed Jul 4, 2019
1 parent 19e58fe commit b46cba1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion test/test.js
Expand Up @@ -157,7 +157,9 @@ if (process.platform !== 'win32') {
});

test('execa() rejects with correct error and doesn\'t throw if running non-executable with input', async t => {
await t.throwsAsync(execa('non-executable', {input: 'Hey!'}), /EACCES/);
// On Node <12.6.0, `EACCESS` is emitted on `childProcess`.
// On Node >=12.6.0, `EPIPE` is emitted on `childProcess.stdin`.
await t.throwsAsync(execa('non-executable', {input: 'Hey!'}), /EACCES|EPIPE/);
});
}

Expand Down

0 comments on commit b46cba1

Please sign in to comment.