runTest method
Future<void>
runTest(
- String path,
- String testName,
- WidgetTester widgetTester,
- Completer<
SerializableTester> completer,
Runs a single test given the path
and testName
to determine the
output location and mode to determine what to do with the output.
widgetTester
should be provided by testWidgets
completer
will be completed with the SerializableTester generated
after testFunction has been run.
Implementation
Future<void> runTest(
String path,
String testName,
WidgetTester widgetTester,
Completer<SerializableTester> completer,
) async {
TestWidgetsFlutterBinding.ensureInitialized();
final generatedValue = testMap[testName]!();
final tester = await generateListTester(path, testName);
await testFunction(generatedValue, tester, widgetTester);
completer.complete(tester);
}