File tree 4 files changed +15
-0
lines changed
4 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -278,6 +278,12 @@ class Test extends AsyncResource {
278
278
} ;
279
279
this . waitingOn = 0 ;
280
280
this . finished = false ;
281
+
282
+ if ( ! testOnlyFlag && ( only || this . runOnlySubtests ) ) {
283
+ const warning =
284
+ "'only' and 'runOnly' require the --test-only command-line option." ;
285
+ this . diagnostic ( warning ) ;
286
+ }
281
287
}
282
288
283
289
hasConcurrency ( ) {
Original file line number Diff line number Diff line change @@ -475,11 +475,13 @@ ok 52 - callback async throw after done
475
475
---
476
476
duration_ms: *
477
477
...
478
+ # 'only' and 'runOnly' require the --test-only command-line option.
478
479
# Subtest: running subtest 3
479
480
ok 3 - running subtest 3
480
481
---
481
482
duration_ms: *
482
483
...
484
+ # 'only' and 'runOnly' require the --test-only command-line option.
483
485
# Subtest: running subtest 4
484
486
ok 4 - running subtest 4
485
487
---
@@ -490,6 +492,7 @@ ok 53 - only is set but not in only mode
490
492
---
491
493
duration_ms: *
492
494
...
495
+ # 'only' and 'runOnly' require the --test-only command-line option.
493
496
# Subtest: custom inspect symbol fail
494
497
not ok 54 - custom inspect symbol fail
495
498
---
Original file line number Diff line number Diff line change @@ -475,11 +475,13 @@ ok 52 - callback async throw after done
475
475
---
476
476
duration_ms: *
477
477
...
478
+ # 'only' and 'runOnly' require the --test-only command-line option.
478
479
# Subtest: running subtest 3
479
480
ok 3 - running subtest 3
480
481
---
481
482
duration_ms: *
482
483
...
484
+ # 'only' and 'runOnly' require the --test-only command-line option.
483
485
# Subtest: running subtest 4
484
486
ok 4 - running subtest 4
485
487
---
@@ -490,6 +492,7 @@ ok 53 - only is set but not in only mode
490
492
---
491
493
duration_ms: *
492
494
...
495
+ # 'only' and 'runOnly' require the --test-only command-line option.
493
496
# Subtest: custom inspect symbol fail
494
497
not ok 54 - custom inspect symbol fail
495
498
---
Original file line number Diff line number Diff line change 199
199
only is set but not in only mode
200
200
running subtest 1 (*ms)
201
201
running subtest 2 (*ms)
202
+ 'only' and 'runOnly' require the --test-only command-line option.
202
203
running subtest 3 (*ms)
204
+ 'only' and 'runOnly' require the --test-only command-line option.
203
205
running subtest 4 (*ms)
204
206
only is set but not in only mode (*ms)
207
+ 'only' and 'runOnly' require the --test-only command-line option.
205
208
206
209
custom inspect symbol fail (*ms)
207
210
customized
You can’t perform that action at this time.
0 commit comments