Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions pkgs/test/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* Require Dart 3.7
* Add `--coverage-path` and `--branch-coverage` options to `dart test`.
* Serve dart2wasm source map files.
* Doc edit: clarify in README that a platform selector includes the compiler.

## 1.26.3

Expand Down
10 changes: 7 additions & 3 deletions pkgs/test/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -322,12 +322,15 @@ adding a [`test_on` field] to your package config file.

Platform selectors use the [boolean selector syntax] defined in the
[`boolean_selector`] package, which is a subset of Dart's expression syntax that
only supports boolean operations. The following identifiers are defined:
only supports boolean operations. The platform selectors identify overlapping
subsets of the ways that Dart code can be compiled and run.

[boolean selector syntax]: https://github.com/dart-lang/boolean_selector/blob/master/README.md

[`boolean_selector`]: https://pub.dev/packages/boolean_selector

The following identifiers are defined:

* `vm`: Whether the test is running on the command-line Dart VM.

* `chrome`: Whether the test is running on Google Chrome.
Expand Down Expand Up @@ -379,8 +382,9 @@ only supports boolean operations. The following identifiers are defined:

* `source`: Whether the test has been run with no compiler (from source).

For example, if you wanted to run a test on every browser but Chrome, you would
write `@TestOn('browser && !chrome')`.
For example, if you wanted to run a test on every browser but Chrome compiled
with dart2js (in opposition to dart2wasm), you would write
`@TestOn('browser && !chrome && dart2js')`.

### Running Tests on Node.js

Expand Down