test function

  1. @isTest
void test(
  1. dynamic body(), {
  2. String? testOn,
  3. Timeout? timeout,
  4. dynamic skip,
  5. dynamic tags,
  6. Map<String, dynamic>? onPlatform,
  7. int? retry,
})

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:

test(() {
  given(...);
  when(...);
  then(...);
});

Implementation

@isTest
void test(
  dynamic Function() body, {
  String? testOn,
  ft.Timeout? timeout,
  skip,
  tags,
  Map<String, dynamic>? onPlatform,
  int? retry,
}) {
  ft.test(
    '',
    gwt(body),
    testOn: testOn,
    timeout: timeout,
    skip: skip,
    tags: tags,
    onPlatform: onPlatform,
    retry: retry,
  );
}