beforeAll function
void
beforeAll(
- dynamic callback()
Registers a function to be run once before all tests.
callback
may be asynchronous; if so, it must return a Future.
If this is called within a test group, callback
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 beforeAll(dynamic Function() callback) {
setUpAll(callback);
}