Skip to content

Commit 53f5d75

Browse files
committed
Fix tests on Windows
1 parent 1ac1de4 commit 53f5d75

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

test.js

+5-7
Original file line numberDiff line numberDiff line change
@@ -65,23 +65,21 @@ test('stdout/stderr/all are undefined if ignored in sync mode', t => {
6565
t.is(all, undefined);
6666
});
6767

68-
const WRONG_COMMAND_STDERR = process.platform === 'win32' ?
69-
'\'wrong\' is not recognized as an internal or external command,\r\noperable program or batch file.' :
70-
'';
71-
7268
test('stdout/stderr/all on process errors', async t => {
7369
const {stdout, stderr, all} = await t.throwsAsync(execa('wrong command'));
7470
t.is(stdout, '');
75-
t.is(stderr, WRONG_COMMAND_STDERR);
76-
t.is(all, WRONG_COMMAND_STDERR);
71+
t.is(stderr, '');
72+
t.is(all, '');
7773
});
7874

7975
test('stdout/stderr/all on process errors, in sync mode', t => {
8076
const {stdout, stderr, all} = t.throws(() => {
8177
execa.sync('wrong command');
8278
});
8379
t.is(stdout, '');
84-
t.is(stderr, WRONG_COMMAND_STDERR);
80+
t.is(stderr, process.platform === 'win32' ?
81+
'\'wrong\' is not recognized as an internal or external command,\r\noperable program or batch file.' :
82+
'');
8583
t.is(all, undefined);
8684
});
8785

0 commit comments

Comments
 (0)