test function
void
test(})
Drop-in replacement for flutter_test's test with Allure reporting.
Implementation
void test(
Object? description,
dynamic Function() body, {
String? testOn,
ft.Timeout? timeout,
Object? skip,
Object? tags,
Map<String, dynamic>? onPlatform,
int? retry,
}) {
_ensureAllureInstalled();
final prepared = preparePackageTestDeclaration(
description: description,
skip: skip,
tags: tags,
stackTrace: StackTrace.current,
ignoredLibrarySuffixes: _ignoredLibrarySuffixes,
);
dynamic Function() effectiveBody = body;
if (prepared.shouldRuntimeSkip) {
effectiveBody = () => ft.markTestSkipped(prepared.runtimeSkipReason);
}
ft.test(
description ?? '',
effectiveBody,
testOn: testOn,
timeout: timeout,
skip: prepared.declarationSkip,
tags: tags,
onPlatform: onPlatform,
retry: retry,
);
}