File tree Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -74,7 +74,7 @@ test('error.shortMessage does not contain stdout/stderr', async t => {
7474
7575test ( 'Original error.message is kept' , async t => {
7676 const { originalMessage} = await t . throwsAsync ( execa ( 'noop' , { cwd : 1 } ) ) ;
77- t . regex ( originalMessage , / T h e " o p t i o n s .c w d " p r o p e r t y m u s t b e o f t y p e s t r i n g . R e c e i v e d t y p e n u m b e r / ) ;
77+ t . true ( originalMessage . startsWith ( ' The "options.cwd" property must be of type string. Received type number' ) ) ;
7878} ) ;
7979
8080test ( '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+ } ) ;
You can’t perform that action at this time.
0 commit comments