[test] More `dart test -c cli` fixes (#2677) More fixes to make `dart --enable-experiment=record-use test -c cli` work: * Fix forwarding experiment flags to the Dart compiler. * Fix concurrency issues: * Don't override compiled app bundles, dir otherwise only `-j 1` succeeds. * https://dart-review.googlesource.com/c/sdk/+/515600/3/pkg/dartdev/lib/src/commands/build.dart also for `-j` more than 1. * Fix pub workspace behavior: Specify the correct root package when running tests in workspaces. * Fix windows (the bundle executable ends with `.exe`). After this PR and https://dart-review.googlesource.com/c/sdk/+/515600, the test project in https://github.com/dart-lang/native/pull/3424 works as expected. ~~A release to pub.dev. Should it be 1.33 instead because we add a new feature? Any in flight changes that block a release @natebosch @jakemac53 ?~~ Edit: First landing the changes before bumping the versions.
Welcome! package:test is the standard testing library for Dart and Flutter. If you have questions about Dart testing, please see the docs for package:test. package:test_api and package:test_core are implementation details and generally not user-facing.
package:checks is a relatively new library for expressing test expectations. It's a more modern version of package:matcher and features a literate API.
| Package | Description | Issues | Version |
|---|---|---|---|
| checks | A framework for checking values against expectations and building custom expectations. | ||
| fake_async | Fake asynchronous events such as timers and microtasks for deterministic testing. | ||
| matcher | Support for specifying test expectations via an extensible Matcher class. Also includes a number of built-in Matcher implementations for common cases. | ||
| test | A full featured library for writing and running Dart tests across platforms. | ||
| test_api | The user facing API for structuring Dart tests and checking expectations. | ||
| test_core | A basic library for writing tests and running them on the VM. | ||
| test_descriptor | An API for defining and verifying files and directory structures. | ||
| test_process | Test processes: starting; validating stdout and stderr; checking exit code. |