diff --git a/test.js b/test.js index 8938a35a16..ebe1a37965 100644 --- a/test.js +++ b/test.js @@ -65,15 +65,11 @@ test('stdout/stderr/all are undefined if ignored in sync mode', t => { t.is(all, undefined); }); -const WRONG_COMMAND_STDERR = process.platform === 'win32' ? - '\'wrong\' is not recognized as an internal or external command,\r\noperable program or batch file.' : - ''; - test('stdout/stderr/all on process errors', async t => { const {stdout, stderr, all} = await t.throwsAsync(execa('wrong command')); t.is(stdout, ''); - t.is(stderr, WRONG_COMMAND_STDERR); - t.is(all, WRONG_COMMAND_STDERR); + t.is(stderr, ''); + t.is(all, ''); }); test('stdout/stderr/all on process errors, in sync mode', t => { @@ -81,7 +77,9 @@ test('stdout/stderr/all on process errors, in sync mode', t => { execa.sync('wrong command'); }); t.is(stdout, ''); - t.is(stderr, WRONG_COMMAND_STDERR); + t.is(stderr, process.platform === 'win32' ? + '\'wrong\' is not recognized as an internal or external command,\r\noperable program or batch file.' : + ''); t.is(all, undefined); });