File tree Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Original file line number Diff line number Diff line change
1
+ import { arch } from 'node:os' ;
1
2
import process from 'node:process' ;
2
3
import test from 'ava' ;
3
4
import { execa , execaSync , $ } from '../../index.js' ;
@@ -62,16 +63,18 @@ if (!isWindows) {
62
63
await t . throwsAsync ( execa ( 'non-executable.js' , { input : 'Hey!' } ) , { message : / E A C C E S / } ) ;
63
64
} ) ;
64
65
65
- test ( 'write to fast-exit subprocess' , async t => {
66
+ if ( arch ( ) === 'x64' ) {
67
+ test ( 'write to fast-exit subprocess' , async t => {
66
68
// Try-catch here is necessary, because this test is not 100% accurate
67
69
// Sometimes subprocess can manage to accept input before exiting
68
- try {
69
- await execa ( `fast-exit-${ process . platform } ` , [ ] , { input : 'data' } ) ;
70
- t . pass ( ) ;
71
- } catch ( error ) {
72
- t . is ( error . code , 'EPIPE' ) ;
73
- }
74
- } ) ;
70
+ try {
71
+ await execa ( `fast-exit-${ process . platform } ` , [ ] , { input : 'data' } ) ;
72
+ t . pass ( ) ;
73
+ } catch ( error ) {
74
+ t . is ( error . code , 'EPIPE' ) ;
75
+ }
76
+ } ) ;
77
+ }
75
78
}
76
79
77
80
const testEarlyErrorPipe = async ( t , getSubprocess ) => {
You can’t perform that action at this time.
0 commit comments