unittest package has been renamed
test. It will export
API through the
0.12.x branch, but it is deprecated and
test should be used
If a future matched against the
completion() matcher throws
an error, that error is printed directly rather than being wrapped in a
string. This allows such errors to be captured using the Zone API and improves
Improve support for Polymer tests. This fixes a flaky time-out error and adds
In order to be more extensible, all exception handling within tests now uses the Zone API.
Add a heartbeat to reset a test's timeout whenever the test interacts with the test infrastructure.
expectAsyncUntil() throw more useful errors
if called outside a test body.
can be disabled with the new
Improve the browser test suite timeout logic to avoid timeouts when running many browser suites at once.
--verbose-traceflag to include core library frames in stack traces.
0.12.0 adds support for a test runner, which can be run via
pub run test in Dart 1.10). By default it runs all files
recursively in the
test/ directory that end in
_test.dart and aren't in a
The test runner supports running tests on the Dart VM and many different
browsers. Test files can use the
@TestOn annotation to declare which platforms
they support. For more information on this and many more new features, see the
As part of moving to a runner-based model, most test configuration is moving out
of the test file and into the runner. As such, many ancillary APIs have been
removed. These APIs include
all its subclasses,
getOrCreateExpectFailureHandler which used to be exported from the
package have also been removed. They existed to enable integration between
matcher that has been streamlined.
A number of APIs from
matcher have been into
Throws, and all of the
throws methods. Some of these have changed slightly:
expect no longer has a named
expect added an optional
id renamed to
Narrow the constraint on matcher to ensure that new features are reflected in unittest's version.
Prints a warning instead of throwing an error when setting the test configuration after it has already been set. The first configuration is always used.
Fix bug in withTestEnvironment where test cases were not reinitialized if called multiple times.
reason named argument to
expectAsyncUntil, which has
the same definition as
Deprecated methods have been removed:
expectAsync2 - use
expectAsyncUntil2 - use
guardAsync - no longer needed
protectAsync2 - no longer needed
mirror_matchers.dart have been removed. They are now in
mock.darthas been removed. It is now in the
mirror_matchers.dart are now in the
mock.dart is now in the
equals now allows a nested matcher as an expected list element or map value
when doing deep matching.
expectAsyncUntil now support up to 6 positional arguments
and correctly handle functions with optional positional arguments with default
Each test is run in a separate
Zone. This ensures that any exceptions that
occur is async operations are reported back to the source test case.
* Running each test in a
Zone addresses the need for these methods.
expectAsync replaces the now deprecated
expectAsyncUntil replaces the now deprecated
enabled is now get-only
* Removed methods:
interactive_html_config.darthas been removed.
solo_group now throw a
StateError if called while tests are running.
rerunTestshas been removed.
Add this to your package's pubspec.yaml file:
dependencies: unittest: "^0.12.4+1"
You can install packages from the command line:
$ pub get
Alternatively, your editor might support pub. Check the docs for your editor to learn more.
Now in your Dart code, you can use:
|0.12.4+1||Dec 14, 2015||Go to the documentation of unittest 0.12.4+1||Download unittest 0.12.4+1 archive|
|0.12.4||Aug 11, 2015||Go to the documentation of unittest 0.12.4||Download unittest 0.12.4 archive|
|0.12.3||Jun 3, 2015||Go to the documentation of unittest 0.12.3||Download unittest 0.12.3 archive|
|0.12.2||May 22, 2015||Go to the documentation of unittest 0.12.2||Download unittest 0.12.2 archive|
|0.12.0||Apr 30, 2015||Go to the documentation of unittest 0.12.0||Download unittest 0.12.0 archive|
|0.11.6+1||May 21, 2015||Go to the documentation of unittest 0.11.6+1||Download unittest 0.11.6+1 archive|
|0.11.6||May 8, 2015||Go to the documentation of unittest 0.11.6||Download unittest 0.11.6 archive|
|0.11.5+4||Feb 19, 2015||Go to the documentation of unittest 0.11.5+4||Download unittest 0.11.5+4 archive|
|0.11.5+3||Feb 12, 2015||Go to the documentation of unittest 0.11.5+3||Download unittest 0.11.5+3 archive|
|0.11.5+2||Feb 6, 2015||Go to the documentation of unittest 0.11.5+2||Download unittest 0.11.5+2 archive|