File tree Expand file tree Collapse file tree 3 files changed +21
-7
lines changed Expand file tree Collapse file tree 3 files changed +21
-7
lines changed Original file line number Diff line number Diff line change @@ -257,6 +257,18 @@ void main() {
257
257
expect (bodyRun, isTrue);
258
258
});
259
259
260
+ test ('runs tests in the group when they are skip: false' , () async {
261
+ var bodyRun = false ;
262
+ var engine = declareEngine (() {
263
+ group ('group' , () {
264
+ test ('test' , skip: false , () => bodyRun = true );
265
+ }, skip: false );
266
+ });
267
+
268
+ await engine.run ();
269
+ expect (bodyRun, isTrue);
270
+ });
271
+
260
272
test ('exposes a LiveTest that emits the correct states' , () {
261
273
var entries = declare (() {
262
274
group ('group' , () {
Original file line number Diff line number Diff line change @@ -519,7 +519,8 @@ $_usage''');
519
519
import 'package:test/test.dart';
520
520
521
521
void main() {
522
- test("success", () {});
522
+ test('success', () {});
523
+ test('explicitly unskipped', skip: false, () {});
523
524
}
524
525
''' ).create ();
525
526
});
@@ -532,7 +533,7 @@ $_usage''');
532
533
533
534
test ('runs all tests with --run-skipped' , () async {
534
535
var test = await runTest (['--run-skipped' , 'test.dart' ]);
535
- expect (test.stdout, emitsThrough (contains ('+1 : All tests passed!' )));
536
+ expect (test.stdout, emitsThrough (contains ('+2 : All tests passed!' )));
536
537
await test.shouldExit (0 );
537
538
});
538
539
});
Original file line number Diff line number Diff line change @@ -90,11 +90,12 @@ Declarer get _declarer {
90
90
///
91
91
/// If [skip] is a String or `true` , the test is skipped. If it's a String, it
92
92
/// should explain why the test is skipped; this reason will be printed instead
93
- /// of running the test. If a [test] is nested within a [group] , the
94
- /// [skip] parameter within the [test] will take precedence over the
95
- /// [skip] parameter in the [group] . For instance, if a [group] is set to
96
- /// `skip: true` , but a [test] within it is configured as `skip: false` , the
97
- /// [test] will not be skipped.
93
+ /// of running the test. If a call to [test] is nested within a [group] , a
94
+ /// non-null `skip` parameter for the 1test1 will take precedence over the skip
95
+ /// parameter in the 1group1. For instance, if a 1group1 is set to `skip: true` ,
96
+ /// but a 1test1 within it is configured as `skip: false` , the 1test1 will not
97
+ /// be skipped. A suite level `Skip()` annotation cannot be overridden with
98
+ /// `skip` arguments to `test` or `group` .
98
99
///
99
100
/// If [tags] is passed, it declares user-defined tags that are applied to the
100
101
/// test. These tags can be used to select or skip the test on the command line,
You can’t perform that action at this time.
0 commit comments