This is a a minimal package for writing tests. At this time this package is not intended to be publicly used as the API will take time to stabilize.
- Extend the timeout for synthetic tests, e.g.
- Update to latest
package:matcher. Improves output for instances of private classes.
- Treat non-solo tests as skipped so they are properly reported.
- Remove logic which accounted for a race condition in state change. The logic
was required because
package:sseused to not guarantee order. This is no longer the case.
- Prepare for upcoming
Stream<List<int>>changes in the Dart SDK.
package:test_apias deprecated to prevent accidental use.
- Don't swallow exceptions from callbacks in
- Internal cleanup - fix lints.
- Fixed a race condition that caused tests to occasionally fail during
tearDownAllwith the message
(tearDownAll) - did not complete [E].
- Expose the
SuitePlatformclasses publicly through a new
- Update to matcher version
- Require Dart SDK
- Remove "runner" extensions.
test_apiframes by default.
- Initial release of
test_api. Provides the basic API for writing tests and touch points for implementing a custom test runner.
Use this package as a library
1. Depend on it
Add this to your package's pubspec.yaml file:
dependencies: test_api: ^0.2.11
2. Install it
You can install packages from the command line:
$ pub get
$ flutter pub get
Alternatively, your editor might support
pub get or
flutter pub get.
Check the docs for your editor to learn more.
3. Import it
Now in your Dart code, you can use:
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
We analyzed this package on Nov 21, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:
- Dart: 2.6.1
- pana: 0.12.21
Detected platforms: Flutter, web, other
No platform restriction found in primary library
lib/src/frontend/throws_matchers.dart. (-5.36 points)
lib/src/frontend/throws_matchers.dart reported 11 hints, including:
line 10 col 37: 'Throws' is deprecated and shouldn't be used. Will be removed in 0.13.0.
line 14 col 5: 'Throws' is deprecated and shouldn't be used. Will be removed in 0.13.0.
line 18 col 5: 'Throws' is deprecated and shouldn't be used. Will be removed in 0.13.0.
line 21 col 33: 'Throws' is deprecated and shouldn't be used. Will be removed in 0.13.0.
line 24 col 39: 'Throws' is deprecated and shouldn't be used. Will be removed in 0.13.0.
lib/src/frontend/expect.dart. (-2.48 points)
lib/src/frontend/expect.dart reported 5 hints:
line 58 col 47: 'ErrorFormatter' is deprecated and shouldn't be used. Will be removed in 0.13.0..
line 79 col 49: 'ErrorFormatter' is deprecated and shouldn't be used. Will be removed in 0.13.0..
line 84 col 12: 'formatFailure' is deprecated and shouldn't be used. Will be removed in 0.13.0..
line 122 col 12: 'formatFailure' is deprecated and shouldn't be used. Will be removed in 0.13.0..
line 127 col 14: 'formatFailure' is deprecated and shouldn't be used. Will be removed in 0.13.0..
lib/src/frontend/async_matcher.dart. (-0.50 points)
lib/src/frontend/async_matcher.dart reported 1 hint:
line 42 col 16: 'formatFailure' is deprecated and shouldn't be used. Will be removed in 0.13.0..
lib/src/frontend/spawn_hybrid.dart. (-0.50 points)
lib/src/frontend/spawn_hybrid.dart reported 1 hint:
line 12 col 1: 'package:test_api/test_api.dart' is deprecated and shouldn't be used. package:test_api is not intended for general use. Please use package:test..
lib/src/frontend/throws_matcher.dart. (-0.50 points)
lib/src/frontend/throws_matcher.dart reported 1 hint:
line 38 col 29: 'Throws' is deprecated and shouldn't be used. Will be removed in 0.13.0.
The package description is too short. (-20 points)
Add more detail to the
description field of
pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.
Maintain an example. (-10 points)
Create a short demo in the
example/ directory to show how to use this package.
Common filename patterns include
test_api.dart. Packages with multiple examples should provide
For more information see the pub package layout conventions.
|Dart SDK||>=2.2.0 <3.0.0|