tearDownTest method

  1. @override
Future<void> tearDownTest(
  1. WidgetTester tester,
  2. TestLaunchContext context,
  3. TestApplicationHandle? handle
)
override

Called after every attempt whose preparation started, including failures from preparation and launch. handle is null when launch did not complete.

Implementation

@override
Future<void> tearDownTest(
  WidgetTester tester,
  TestLaunchContext context,
  TestApplicationHandle? handle,
) async {
  if (handle is StandaloneEnsembleApplicationHandle &&
      handle.ownsNavigationFlow) {
    await handle.context.navigationFlow.stopListening();
  }
  await tester.pumpWidget(const SizedBox.shrink());
  await tester.pump();
  await EnsembleTestHarness.restorePreSuiteStorage();
}