@@ -75,59 +75,57 @@ test('--mutex network', async () => {
7575
7676// Windows doesn't have the "echo" utility
7777// Since this feature isn't platform-specific, running them on OSX and Linux only should be fine
78- if ( process . platform !== 'win32' ) {
79- test ( 'yarn run <script> --opt' , async ( ) => {
80- const cwd = await makeTemp ( ) ;
78+ test ( 'yarn run <script> --opt' , async ( ) => {
79+ const cwd = await makeTemp ( ) ;
8180
82- await fs . writeFile (
83- path . join ( cwd , 'package.json' ) ,
84- JSON . stringify ( {
85- scripts : { echo : ' echo' } ,
86- } ) ,
87- ) ;
81+ await fs . writeFile (
82+ path . join ( cwd , 'package.json' ) ,
83+ JSON . stringify ( {
84+ scripts : { echo : ` echo` } ,
85+ } ) ,
86+ ) ;
8887
89- const command = path . resolve ( __dirname , '../bin/yarn' ) ;
90- const options = { cwd, env : { YARN_SILENT : 1 } } ;
88+ const command = path . resolve ( __dirname , '../bin/yarn' ) ;
89+ const options = { cwd, env : { YARN_SILENT : 1 } } ;
9190
92- const { stderr : stderr , stdout : stdout } = execa ( command , [ 'run' , 'echo' , '--opt' ] , options ) ;
91+ const { stderr : stderr , stdout : stdout } = execa ( command , [ 'run' , 'echo' , '--opt' ] , options ) ;
9392
94- const stdoutPromise = misc . consumeStream ( stdout ) ;
95- const stderrPromise = misc . consumeStream ( stderr ) ;
93+ const stdoutPromise = misc . consumeStream ( stdout ) ;
94+ const stderrPromise = misc . consumeStream ( stderr ) ;
9695
97- const [ stdoutOutput , stderrOutput ] = await Promise . all ( [ stdoutPromise , stderrPromise ] ) ;
96+ const [ stdoutOutput , stderrOutput ] = await Promise . all ( [ stdoutPromise , stderrPromise ] ) ;
9897
99- expect ( stdoutOutput . toString ( ) . trim ( ) ) . toEqual ( '--opt' ) ;
100- expect ( stderrOutput . toString ( ) ) . not . toMatch (
101- / F r o m Y a r n 1 \. 0 o n w a r d s , s c r i p t s d o n ' t r e q u i r e " - - " f o r o p t i o n s t o b e f o r w a r d e d / ,
102- ) ;
103- } ) ;
98+ expect ( stdoutOutput . toString ( ) . trim ( ) ) . toEqual ( '--opt' ) ;
99+ expect ( stderrOutput . toString ( ) ) . not . toMatch (
100+ / F r o m Y a r n 1 \. 0 o n w a r d s , s c r i p t s d o n ' t r e q u i r e " - - " f o r o p t i o n s t o b e f o r w a r d e d / ,
101+ ) ;
102+ } ) ;
104103
105- test ( 'yarn run <script> -- --opt' , async ( ) => {
106- const cwd = await makeTemp ( ) ;
104+ test ( 'yarn run <script> -- --opt' , async ( ) => {
105+ const cwd = await makeTemp ( ) ;
107106
108- await fs . writeFile (
109- path . join ( cwd , 'package.json' ) ,
110- JSON . stringify ( {
111- scripts : { echo : ' echo' } ,
112- } ) ,
113- ) ;
107+ await fs . writeFile (
108+ path . join ( cwd , 'package.json' ) ,
109+ JSON . stringify ( {
110+ scripts : { echo : ` echo` } ,
111+ } ) ,
112+ ) ;
114113
115- const command = path . resolve ( __dirname , '../bin/yarn' ) ;
116- const options = { cwd, env : { YARN_SILENT : 1 } } ;
114+ const command = path . resolve ( __dirname , '../bin/yarn' ) ;
115+ const options = { cwd, env : { YARN_SILENT : 1 } } ;
117116
118- const { stderr : stderr , stdout : stdout } = execa ( command , [ 'run' , 'echo' , '--' , '--opt' ] , options ) ;
117+ const { stderr : stderr , stdout : stdout } = execa ( command , [ 'run' , 'echo' , '--' , '--opt' ] , options ) ;
119118
120- const stdoutPromise = misc . consumeStream ( stdout ) ;
121- const stderrPromise = misc . consumeStream ( stderr ) ;
119+ const stdoutPromise = misc . consumeStream ( stdout ) ;
120+ const stderrPromise = misc . consumeStream ( stderr ) ;
122121
123- const [ stdoutOutput , stderrOutput ] = await Promise . all ( [ stdoutPromise , stderrPromise ] ) ;
122+ const [ stdoutOutput , stderrOutput ] = await Promise . all ( [ stdoutPromise , stderrPromise ] ) ;
124123
125- expect ( stdoutOutput . toString ( ) . trim ( ) ) . toEqual ( '--opt' ) ;
126- expect ( stderrOutput . toString ( ) ) . toMatch (
127- / F r o m Y a r n 1 \. 0 o n w a r d s , s c r i p t s d o n ' t r e q u i r e " - - " f o r o p t i o n s t o b e f o r w a r d e d / ,
128- ) ;
129- } ) ;
130- }
124+ expect ( stdoutOutput . toString ( ) . trim ( ) ) . toEqual ( '--opt' ) ;
125+ expect ( stderrOutput . toString ( ) ) . toMatch (
126+ / F r o m Y a r n 1 \. 0 o n w a r d s , s c r i p t s d o n ' t r e q u i r e " - - " f o r o p t i o n s t o b e f o r w a r d e d / ,
127+ ) ;
128+ } ) ;
131129
132130test ( 'cache folder fallback' , async ( ) => {
133131 const cwd = await makeTemp ( ) ;
0 commit comments