addTearDown method
Runs callback after this test completes.
The callback may return a Future. Like all tear-downs, callbacks are
run in the reverse of the order they're declared.
Implementation
void addTearDown(FutureOr<dynamic> Function() callback) {
if (closed) throw ClosedException();
if (_test.isScaffoldAll) {
Declarer.current!.addTearDownAll(callback);
} else {
_tearDowns.add(callback);
}
}