test function
void
test(})
Drop-in replacement for package:test's test with Allure reporting.
Implementation
void test(
Object? description,
FutureOr<dynamic> Function() body, {
String? testOn,
t.Timeout? timeout,
Object? skip,
Object? tags,
Map<String, dynamic>? onPlatform,
int? retry,
t.TestLocation? location,
@Deprecated('Debug only') bool solo = false,
}) {
_ensureAllureInstalled();
final prepared = preparePackageTestDeclaration(
description: description,
skip: skip,
tags: tags,
locationUri: location?.uri,
stackTrace: StackTrace.current,
);
FutureOr<dynamic> Function() effectiveBody = body;
if (prepared.shouldRuntimeSkip) {
effectiveBody = () => t.markTestSkipped(prepared.runtimeSkipReason);
}
t.test(
description,
effectiveBody,
testOn: testOn,
timeout: timeout,
skip: prepared.declarationSkip,
tags: tags,
onPlatform: onPlatform,
retry: retry,
location: location,
solo: solo,
);
}