tearDown function

void tearDown(
  1. dynamic body()
)

Registers a function to be run after tests.

This function will be called after each test is run. The body may be asynchronous; if so, it must return a Future.

If this is called within a test group, it applies only to tests in that group. The body will be run before any tear-down callbacks in parent groups or at the top level.

Each callback at the top level or in a given group will be run in the reverse of the order they were declared.

See also addTearDown, which adds tear-downs to a running test.

Implementation

void tearDown(dynamic Function() body) {
  _maybeConfigureTearDownForTestFile();
  _declarer.tearDown(body);
}