convenientTestMain function
Future<void>
convenientTestMain(
- ConvenientTestSlot slot,
- FutureOr<
void> testBody(), { - ExecutionEnv executionEnv = ExecutionEnv.deviceTest,
Please make this the only method in your "main" method.
Implementation
Future<void> convenientTestMain(
ConvenientTestSlot slot,
FutureOr<void> Function() testBody, {
ExecutionEnv executionEnv = ExecutionEnv.deviceTest,
}) async {
myGetIt.registerSingleton<ConvenientTestSlot>(slot);
ConvenientTestWrapperWidget.convenientTestActive = true;
switch (executionEnv) {
case ExecutionEnv.deviceTest:
await convenientTestEntrypointWhenEnvDevice(testBody);
break;
case ExecutionEnv.widgetTest:
await convenientTestEntrypointWhenEnvWidget(testBody);
break;
}
}