Skip to content

Commit dcde090

Browse files
committed
squash
1 parent d33de2b commit dcde090

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

test/error.js

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ test('error.shortMessage does not contain stdout/stderr', async t => {
7474

7575
test('Original error.message is kept', async t => {
7676
const {originalMessage} = await t.throwsAsync(execa('noop', {cwd: 1}));
77-
t.regex(originalMessage, /The "options.cwd" property must be of type string. Received type number/);
77+
t.true(originalMessage.startsWith('The "options.cwd" property must be of type string. Received type number'));
7878
});
7979

8080
test('failed is false on success', async t => {
@@ -204,10 +204,7 @@ test('error.code is undefined on success', async t => {
204204
t.is(code, undefined);
205205
});
206206

207-
// Windows doesn't throw ENOENT on invalid command
208-
if (process.platform !== 'win32') {
209-
test('error.code is defined on failure if applicable', async t => {
210-
const {code} = await t.throwsAsync(execa('invalid'));
211-
t.is(code, 'ENOENT');
212-
});
213-
}
207+
test('error.code is defined on failure if applicable', async t => {
208+
const {code} = await t.throwsAsync(execa(''));
209+
t.is(code, 'ERR_INVALID_ARG_VALUE');
210+
});

0 commit comments

Comments
 (0)