testWidgets function
- @isTest
- WidgetTesterCallback callback, {
- bool? skip,
- Timeout? timeout,
- bool semanticsEnabled = true,
- TestVariant<
Object?> variant = const ft.DefaultTestVariant(), - dynamic tags,
Test with preparing unit testing environment for given/when/then methods
An exception will be thrown if you don't wrap a test body by this.
Example:
testWidgets((tester) async {
given(...);
when(...);
then(...);
});
Implementation
@isTest
void testWidgets(
ft.WidgetTesterCallback callback, {
bool? skip,
ft.Timeout? timeout,
bool semanticsEnabled = true,
ft.TestVariant<Object?> variant = const ft.DefaultTestVariant(),
dynamic tags,
}) {
ft.testWidgets(
'',
gwt_(callback),
skip: skip,
timeout: timeout,
semanticsEnabled: semanticsEnabled,
variant: variant,
tags: tags,
);
}