@@ -157,36 +157,22 @@ test('It handles resolveJsonModule option and loads JSON modules', async (t) =>
157
157
158
158
test ( 'It should not allow --script-mode and --dir together' , async ( t ) => {
159
159
const ps = spawnTsNodeDev (
160
- [
161
- `--script-mode` ,
162
- `--dir folder` ,
163
- `simple.ts` ,
164
- ] . join ( ' ' )
165
- ) //.turnOnOutput()
160
+ [ `--script-mode` , `--dir folder` , `simple.ts` ] . join ( ' ' )
161
+ ) //.turnOnOutput()
166
162
await ps . waitForLine ( / T y p e E r r o r : S c r i p t m o d e c a n n o t b e c o m b i n e d w i t h ` - - d i r ` / )
167
163
t . pass ( 'ok' )
168
164
await ps . exit ( )
169
165
} )
170
166
171
167
test ( 'It should use the tsconfig at --dir when defined' , async ( t ) => {
172
- const ps = spawnTsNodeDev (
173
- [
174
- `--dir dir-test` ,
175
- `dir-test/index.ts` ,
176
- ] . join ( ' ' )
177
- ) //.turnOnOutput()
168
+ const ps = spawnTsNodeDev ( [ `--dir dir-test` , `dir-test/index.ts` ] . join ( ' ' ) ) //.turnOnOutput()
178
169
await ps . waitForLine ( / \{ h e l l o : ' w o r l d ' \} / )
179
170
t . pass ( 'ok' )
180
171
await ps . exit ( )
181
172
} )
182
173
183
174
test ( 'It should use the tsconfig at --script-mode when defined' , async ( t ) => {
184
- const ps = spawnTsNodeDev (
185
- [
186
- `-s` ,
187
- `dir-test/index.ts` ,
188
- ] . join ( ' ' )
189
- ) //.turnOnOutput()
175
+ const ps = spawnTsNodeDev ( [ `-s` , `dir-test/index.ts` ] . join ( ' ' ) ) //.turnOnOutput()
190
176
await ps . waitForLine ( / \{ h e l l o : ' w o r l d ' \} / )
191
177
t . pass ( 'ok' )
192
178
await ps . exit ( )
@@ -199,14 +185,12 @@ test('It should fail if not using --dir or --script-mode on dir-test/index.ts',
199
185
`--compiler-options=${ JSON . stringify ( cOptions ) } ` ,
200
186
`dir-test/index.ts` ,
201
187
] . join ( ' ' )
202
- ) . turnOnOutput ( )
188
+ ) // .turnOnOutput()
203
189
await ps . waitForLine ( / h a s n o d e f a u l t e x p o r t ./ )
204
190
t . pass ( 'ok' )
205
191
await ps . exit ( )
206
192
} )
207
193
208
-
209
-
210
194
test ( 'It allows to use TS Transformers' , async ( t ) => {
211
195
const cOptions = { plugins : [ { transform : 'ts-nameof' , type : 'raw' } ] }
212
196
const ps = spawnTsNodeDev (
@@ -301,8 +285,8 @@ test.skip('It should add require with -r flag', async (t) => {
301
285
t . end ( )
302
286
} )
303
287
304
- test . only ( 'It should handle --deps flag' , async ( t ) => {
305
- const ps = spawnTsNodeDev ( [ `--deps` , `--respawn` , `req-package` ] . join ( ' ' ) ) . turnOnOutput ( )
288
+ test ( 'It should handle --deps flag' , async ( t ) => {
289
+ const ps = spawnTsNodeDev ( [ `--deps` , `--respawn` , `req-package` ] . join ( ' ' ) ) // .turnOnOutput()
306
290
307
291
await ps . waitForLine ( / P A C K A G E / )
308
292
@@ -313,10 +297,11 @@ test.only('It should handle --deps flag', async (t) => {
313
297
'PACKAGE' ,
314
298
'CHANGED PACKAGE'
315
299
) ,
316
- 250
300
+ 100
317
301
)
318
302
319
303
await ps . waitForLine ( / C H A N G E D P A C K A G E / )
304
+ await ps . exit ( )
320
305
t . pass ( )
321
306
t . end ( )
322
307
} )
0 commit comments