test function

FutureOr<void> test(
  1. String description,
  2. dynamic body()
)

Performs a test by running the function body.

Implementation

FutureOr<void> test(String description, dynamic Function() body) {
  _enterTest();
  if (_setupAllCallback != null) {
    _setupAllCallback!();
  }
  if (_inGroupBlock) {
    print('  test-$_groupTestCounter: $description');
  } else {
    print('test-$_testCounter: $description');
  }
  body();

  if (_teardownAllCallback != null) {
    _teardownAllCallback!();
  }
}