setUpAll function
- dynamic body()
Registers a function to be run once before all tests.
The body
may be asynchronous; if so, it must return a Future.
If this is called within a test group, The body
will run before all tests
in that group. It will be run after any setUpAll callbacks in parent
groups or at the top level. It won't be run if none of the tests in the
group are run.
Note: This function makes it very easy to accidentally introduce hidden dependencies between tests that should be isolated. In general, you should prefer setUp, and only use setUpAll if the callback is prohibitively slow.
Implementation
void setUpAll(dynamic Function() body) {
_maybeConfigureTearDownForTestFile();
_declarer.setUpAll(body);
}