declareTest function
void
declareTest(})
Implementation
void declareTest(
String name,
List<Component> components,
FutureOr<void> Function() body, {
dart_test.Timeout? timeout,
Object? skip,
Map<String, dynamic> config = const {},
}) {
dart_test.group(name, () {
TestHost? host;
dart_test.setUp(() async {
host = TestHost(
components: components,
initialConfig: config,
testBody: body,
);
await host?.initialize();
});
dart_test.test(
name,
() async => await host!
.findComponent(Find<_TestRunnerServiceInstance>(), null)
.runTest(body),
timeout: timeout,
skip: skip,
);
dart_test.tearDown(() async {
if (host?.state == ServiceHostState.initialized) {
await host?.shutdown();
}
});
});
}