Skip to content

Commit e09253f

Browse files
fahaddocRenzo-Olivares
authored andcommitted
Fold the two initState-dependency tests into one
Both pumped the same TestInherited(child: ExpectFail(...)) tree. The flutter#5491 test only checked that an exception was caught, which the error assertions in the flutter#105705 test already cover, so they are now a single test carrying both regression references.
1 parent f778431 commit e09253f

1 file changed

Lines changed: 1 addition & 16 deletions

File tree

‎packages/flutter/test/widgets/inherited_test.dart‎

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -529,22 +529,7 @@ void main() {
529529

530530
testWidgets('initState() dependency on Inherited asserts', (WidgetTester tester) async {
531531
// This is a regression test for https://github.com/flutter/flutter/issues/5491
532-
var exceptionCaught = false;
533-
534-
final parent = TestInherited(
535-
child: ExpectFail((Object error) {
536-
exceptionCaught = true;
537-
}),
538-
);
539-
await tester.pumpWidget(parent);
540-
541-
expect(exceptionCaught, isTrue);
542-
});
543-
544-
testWidgets('initState() dependency on Inherited explains why initState() is too early', (
545-
WidgetTester tester,
546-
) async {
547-
// This is a regression test for https://github.com/flutter/flutter/issues/105705
532+
// and https://github.com/flutter/flutter/issues/105705.
548533
Object? error;
549534

550535
final parent = TestInherited(

0 commit comments

Comments
 (0)