Skip to content

Commit

Permalink
Fix test on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
ehmicky committed May 7, 2019
1 parent 3c04498 commit d8b8faf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test.js
Expand Up @@ -186,7 +186,8 @@ test('stripFinalNewline option', async t => {

test('preferLocal option', async t => {
await execa('ava', ['--version'], {env: {PATH: ''}});
await t.throwsAsync(execa('ava', ['--version'], {preferLocal: false, env: {PATH: ''}}), /spawn .* ENOENT/);
const errorRegExp = process.platform === 'win32' ? /not recognized/ : /spawn ava ENOENT/;
await t.throwsAsync(execa('ava', ['--version'], {preferLocal: false, env: {PATH: ''}}), errorRegExp);
});

test.serial('localDir option', async t => {
Expand Down

0 comments on commit d8b8faf

Please sign in to comment.