@@ -53,12 +53,12 @@ test('allow commands with spaces and array arguments', async t => {
5353} ) ;
5454
5555test ( 'execaCommand()' , async t => {
56- const { stdout} = await execaCommand ( 'node test/fixtures/ echo.js foo bar' ) ;
56+ const { stdout} = await execaCommand ( 'echo.js foo bar' ) ;
5757 t . is ( stdout , 'foo\nbar' ) ;
5858} ) ;
5959
6060test ( 'execaCommand() ignores consecutive spaces' , async t => {
61- const { stdout} = await execaCommand ( 'node test/fixtures/ echo.js foo bar' ) ;
61+ const { stdout} = await execaCommand ( 'echo.js foo bar' ) ;
6262 t . is ( stdout , 'foo\nbar' ) ;
6363} ) ;
6464
@@ -68,27 +68,27 @@ test('execaCommand() allows escaping spaces in commands', async t => {
6868} ) ;
6969
7070test ( 'execaCommand() allows escaping spaces in arguments' , async t => {
71- const { stdout} = await execaCommand ( 'node test/fixtures/ echo.js foo\\ bar' ) ;
71+ const { stdout} = await execaCommand ( 'echo.js foo\\ bar' ) ;
7272 t . is ( stdout , 'foo bar' ) ;
7373} ) ;
7474
7575test ( 'execaCommand() escapes other whitespaces' , async t => {
76- const { stdout} = await execaCommand ( 'node test/fixtures/ echo.js foo\tbar' ) ;
76+ const { stdout} = await execaCommand ( 'echo.js foo\tbar' ) ;
7777 t . is ( stdout , 'foo\tbar' ) ;
7878} ) ;
7979
8080test ( 'execaCommand() trims' , async t => {
81- const { stdout} = await execaCommand ( ' node test/fixtures/ echo.js foo bar ' ) ;
81+ const { stdout} = await execaCommand ( ' echo.js foo bar ' ) ;
8282 t . is ( stdout , 'foo\nbar' ) ;
8383} ) ;
8484
8585test ( 'execaCommandSync()' , t => {
86- const { stdout} = execaCommandSync ( 'node test/fixtures/ echo.js foo bar' ) ;
86+ const { stdout} = execaCommandSync ( 'echo.js foo bar' ) ;
8787 t . is ( stdout , 'foo\nbar' ) ;
8888} ) ;
8989
9090test ( '$' , async t => {
91- const { stdout} = await $ `node test/fixtures/ echo.js foo bar` ;
91+ const { stdout} = await $ `echo.js foo bar` ;
9292 t . is ( stdout , 'foo\nbar' ) ;
9393} ) ;
9494
@@ -98,76 +98,76 @@ test('$ accepts options', async t => {
9898} ) ;
9999
100100test ( '$ allows string interpolation' , async t => {
101- const { stdout} = await $ `node test/fixtures/ echo.js foo ${ 'bar' } ` ;
101+ const { stdout} = await $ `echo.js foo ${ 'bar' } ` ;
102102 t . is ( stdout , 'foo\nbar' ) ;
103103} ) ;
104104
105105test ( '$ allows number interpolation' , async t => {
106- const { stdout} = await $ `node test/fixtures/ echo.js 1 ${ 2 } ` ;
106+ const { stdout} = await $ `echo.js 1 ${ 2 } ` ;
107107 t . is ( stdout , '1\n2' ) ;
108108} ) ;
109109
110110test ( '$ allows array interpolation' , async t => {
111- const { stdout} = await $ `node test/fixtures/ echo.js ${ [ 'foo' , 'bar' ] } ` ;
111+ const { stdout} = await $ `echo.js ${ [ 'foo' , 'bar' ] } ` ;
112112 t . is ( stdout , 'foo\nbar' ) ;
113113} ) ;
114114
115115test ( '$ allows execa return value interpolation' , async t => {
116- const foo = await $ `node test/fixtures/ echo.js foo` ;
117- const { stdout} = await $ `node test/fixtures/ echo.js ${ foo } bar` ;
116+ const foo = await $ `echo.js foo` ;
117+ const { stdout} = await $ `echo.js ${ foo } bar` ;
118118 t . is ( stdout , 'foo\nbar' ) ;
119119} ) ;
120120
121121test ( '$ allows execa return value array interpolation' , async t => {
122- const foo = await $ `node test/fixtures/ echo.js foo` ;
123- const { stdout} = await $ `node test/fixtures/ echo.js ${ [ foo , 'bar' ] } ` ;
122+ const foo = await $ `echo.js foo` ;
123+ const { stdout} = await $ `echo.js ${ [ foo , 'bar' ] } ` ;
124124 t . is ( stdout , 'foo\nbar' ) ;
125125} ) ;
126126
127127test ( '$ allows execa return value buffer interpolation' , async t => {
128- const foo = await $ ( { encoding : null } ) `node test/fixtures/ echo.js foo` ;
129- const { stdout} = await $ `node test/fixtures/ echo.js ${ foo } bar` ;
128+ const foo = await $ ( { encoding : null } ) `echo.js foo` ;
129+ const { stdout} = await $ `echo.js ${ foo } bar` ;
130130 t . is ( stdout , 'foo\nbar' ) ;
131131} ) ;
132132
133133test ( '$ allows execa return value buffer array interpolation' , async t => {
134- const foo = await $ ( { encoding : null } ) `node test/fixtures/ echo.js foo` ;
135- const { stdout} = await $ `node test/fixtures/ echo.js ${ [ foo , 'bar' ] } ` ;
134+ const foo = await $ ( { encoding : null } ) `echo.js foo` ;
135+ const { stdout} = await $ `echo.js ${ [ foo , 'bar' ] } ` ;
136136 t . is ( stdout , 'foo\nbar' ) ;
137137} ) ;
138138
139139test ( '$ ignores consecutive spaces' , async t => {
140- const { stdout} = await $ `node test/fixtures/ echo.js foo bar` ;
140+ const { stdout} = await $ `echo.js foo bar` ;
141141 t . is ( stdout , 'foo\nbar' ) ;
142142} ) ;
143143
144144test ( '$ allows escaping spaces with interpolation' , async t => {
145- const { stdout} = await $ `node test/fixtures/ echo.js ${ 'foo bar' } ` ;
145+ const { stdout} = await $ `echo.js ${ 'foo bar' } ` ;
146146 t . is ( stdout , 'foo bar' ) ;
147147} ) ;
148148
149149test ( '$ disallows escaping spaces with backslashes' , async t => {
150- const { stdout} = await $ `node test/fixtures/ echo.js foo\\ bar` ;
150+ const { stdout} = await $ `echo.js foo\\ bar` ;
151151 t . is ( stdout , 'foo\\\nbar' ) ;
152152} ) ;
153153
154154test ( '$ allows space escaped values in array interpolation' , async t => {
155- const { stdout} = await $ `node test/fixtures/ echo.js ${ [ 'foo' , 'bar baz' ] } ` ;
155+ const { stdout} = await $ `echo.js ${ [ 'foo' , 'bar baz' ] } ` ;
156156 t . is ( stdout , 'foo\nbar baz' ) ;
157157} ) ;
158158
159159test ( '$ passes newline escape sequence as one argument' , async t => {
160- const { stdout} = await $ `node test/fixtures/ echo.js \n` ;
160+ const { stdout} = await $ `echo.js \n` ;
161161 t . is ( stdout , '\n' ) ;
162162} ) ;
163163
164164test ( '$ passes newline escape sequence in interpolation as one argument' , async t => {
165- const { stdout} = await $ `node test/fixtures/ echo.js ${ '\n' } ` ;
165+ const { stdout} = await $ `echo.js ${ '\n' } ` ;
166166 t . is ( stdout , '\n' ) ;
167167} ) ;
168168
169169test ( '$ handles invalid escape sequence' , async t => {
170- const { stdout} = await $ `node test/fixtures/ echo.js \u` ;
170+ const { stdout} = await $ `echo.js \u` ;
171171 t . is ( stdout , '\\u' ) ;
172172} ) ;
173173
@@ -177,17 +177,17 @@ test('$ allows escaping spaces in commands with interpolation', async t => {
177177} ) ;
178178
179179test ( '$ escapes other whitespaces' , async t => {
180- const { stdout} = await $ `node test/fixtures/ echo.js foo\tbar` ;
180+ const { stdout} = await $ `echo.js foo\tbar` ;
181181 t . is ( stdout , 'foo\tbar' ) ;
182182} ) ;
183183
184184test ( '$ trims' , async t => {
185- const { stdout} = await $ ` node test/fixtures/ echo.js foo bar ` ;
185+ const { stdout} = await $ ` echo.js foo bar ` ;
186186 t . is ( stdout , 'foo\nbar' ) ;
187187} ) ;
188188
189189test ( '$.sync' , t => {
190- const { stdout} = $ . sync `node test/fixtures/ echo.js foo bar` ;
190+ const { stdout} = $ . sync `echo.js foo bar` ;
191191 t . is ( stdout , 'foo\nbar' ) ;
192192} ) ;
193193
@@ -197,38 +197,38 @@ test('$.sync accepts options', t => {
197197} ) ;
198198
199199test ( '$.sync allows execa return value interpolation' , t => {
200- const foo = $ . sync `node test/fixtures/ echo.js foo` ;
201- const { stdout} = $ . sync `node test/fixtures/ echo.js ${ foo } bar` ;
200+ const foo = $ . sync `echo.js foo` ;
201+ const { stdout} = $ . sync `echo.js ${ foo } bar` ;
202202 t . is ( stdout , 'foo\nbar' ) ;
203203} ) ;
204204
205205test ( '$.sync allows execa return value array interpolation' , t => {
206- const foo = $ . sync `node test/fixtures/ echo.js foo` ;
207- const { stdout} = $ . sync `node test/fixtures/ echo.js ${ [ foo , 'bar' ] } ` ;
206+ const foo = $ . sync `echo.js foo` ;
207+ const { stdout} = $ . sync `echo.js ${ [ foo , 'bar' ] } ` ;
208208 t . is ( stdout , 'foo\nbar' ) ;
209209} ) ;
210210
211211test ( '$.sync allows execa return value buffer interpolation' , t => {
212- const foo = $ ( { encoding : null } ) . sync `node test/fixtures/ echo.js foo` ;
213- const { stdout} = $ . sync `node test/fixtures/ echo.js ${ foo } bar` ;
212+ const foo = $ ( { encoding : null } ) . sync `echo.js foo` ;
213+ const { stdout} = $ . sync `echo.js ${ foo } bar` ;
214214 t . is ( stdout , 'foo\nbar' ) ;
215215} ) ;
216216
217217test ( '$.sync allows execa return value buffer array interpolation' , t => {
218- const foo = $ ( { encoding : null } ) . sync `node test/fixtures/ echo.js foo` ;
219- const { stdout} = $ . sync `node test/fixtures/ echo.js ${ [ foo , 'bar' ] } ` ;
218+ const foo = $ ( { encoding : null } ) . sync `echo.js foo` ;
219+ const { stdout} = $ . sync `echo.js ${ [ foo , 'bar' ] } ` ;
220220 t . is ( stdout , 'foo\nbar' ) ;
221221} ) ;
222222
223223const invalidExpression = test . macro ( {
224224 async exec ( t , input , expected ) {
225225 await t . throwsAsync (
226- async ( ) => $ `node test/fixtures/ echo.js ${ input } ` ,
226+ async ( ) => $ `echo.js ${ input } ` ,
227227 { instanceOf : TypeError , message : expected } ,
228228 ) ;
229229
230230 t . throws (
231- ( ) => $ . sync `node test/fixtures/ echo.js ${ input } ` ,
231+ ( ) => $ . sync `echo.js ${ input } ` ,
232232 { instanceOf : TypeError , message : expected } ,
233233 ) ;
234234 } ,
0 commit comments