mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
The Dart SDK's `package:async_helper/async_minitest.dart` was never intended for new tests, it was a drop-in polyfill for the legacy `package:unit_test` that some Dart SDK tests were using. The tests should never have used that package, and migrating them to `package:test` was not an option, so the `async_minitest.dart` file was the minimal polyfill that made all the tests run. Since then, new tests have been written using the file, and to stop that, the file will now become deprecated, and (hopefully some day) removed. If the Flutter engine wants to keep using the file, they should own their own copy of it, which is what this change does. (Also migrates off the to-be-deprecated `assertStatementsEnabled` property of `package:expect/expect.dart`, moved to the new `asserts` from `package:expect/variations.dart`.)
package:litetest
This is a wrapper around package:async_helper from the Dart SDK source repo
at //pkg/async_helper that works in the environment of flutter_tester.
This wrapper is needed to ensure that all tests run to completion before the
process exits. This is accomplished by opening a ReceivePort for each test,
which is only closed when the test finishes running.
Limitations
This package is intended only for use in the flutter/engine repo by unit
tests that run on flutter_tester. Even though the API resembles the API
provided by package:test, it has all the same limitations that
package:async_helper has.