Skip to content

Commit 9cc5111

Browse files
committed
Add a sentence to clarify "Platform"
A "platform" in the test runner's use encompasses more detail than might be expected. Add a sentence in the description of platform selectors to note that it can cover details about how the code is compiled. Replaces #2548
1 parent 8083c8f commit 9cc5111

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

pkgs/test/README.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -322,12 +322,16 @@ adding a [`test_on` field] to your package config file.
322322

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

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

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

332+
The following identifiers are defined:
333+
334+
331335
* `vm`: Whether the test is running on the command-line Dart VM.
332336

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

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

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

385390
### Running Tests on Node.js
386391

0 commit comments

Comments
 (0)