-
Andrew Kolos authored
Fixes https://github.com/flutter/flutter/issues/140665 by replacing use of `setUpAll` and `teardownAll` with `setUp` and `teardown` respectively. My theory has to how this issue happened (and how this PR fixes it) is that `setUpAll` is not guaranteed to run after any `setUp` in any parent test groups. However, `setUp` is guaranteed to run after any set-up callbacks in parent groups. From the [documentation](https://api.flutter.dev/flutter/flutter_test/setUp.html): > If this is called within a test group, it applies only to tests in that group. The body will be run after any set-up callbacks in parent groups or at the top level. Meanwhile, [`setUpAll`](https://api.flutter.dev/flutter/flutter_test/setUpAll.html) has a weaker documented guarantee that applies only to other `setUpAll` calls: > 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](https://api.flutter.dev/flutter/flutter_test/setUpAll.html) callbacks in parent groups or at the top level. It won't be run if none of the tests in the group are run.
Name |
Last commit
|
Last update |
---|---|---|
.. | ||
bin | ||
doc | ||
gradle | ||
ide_templates/intellij | ||
lib | ||
static | ||
templates | ||
test | ||
tool | ||
README.md | ||
analysis_options.yaml | ||
dart_test.yaml | ||
pubspec.yaml |