| OLD | NEW |
| 1 Each package may include a configuration file that applies to the package as a | 1 Each package may include a configuration file that applies to the package as a |
| 2 whole. This file can be used to provide custom defaults for various options, to | 2 whole. This file can be used to provide custom defaults for various options, to |
| 3 define configuration for multiple files, and more. | 3 define configuration for multiple files, and more. |
| 4 | 4 |
| 5 The file is named `dart_test.yaml` and lives at the root of the package, next to | 5 The file is named `dart_test.yaml` and lives at the root of the package, next to |
| 6 the package's pubspec. Like the pubspec, it's a [YAML][] file. Here's an | 6 the package's pubspec. Like the pubspec, it's a [YAML][] file. Here's an |
| 7 example: | 7 example: |
| 8 | 8 |
| 9 [YAML]: http://yaml.org/ | 9 [YAML]: http://yaml.org/ |
| 10 | 10 |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 [test]: https://www.dartdocs.org/documentation/test/0.12.10+2/test/test.html | 104 [test]: https://www.dartdocs.org/documentation/test/0.12.10+2/test/test.html |
| 105 | 105 |
| 106 ```yaml | 106 ```yaml |
| 107 tags: | 107 tags: |
| 108 chrome: | 108 chrome: |
| 109 skip: "Our Chrome launcher is busted. See issue 1234." | 109 skip: "Our Chrome launcher is busted. See issue 1234." |
| 110 ``` | 110 ``` |
| 111 | 111 |
| 112 ### `test_on` | 112 ### `test_on` |
| 113 | 113 |
| 114 This field declares which platforms a test supports. It's usually applied to | 114 This field declares which platforms a test supports. It takes a |
| 115 [specific tags](#configuring-tags) rather than used at the top level. It takes a | 115 [platform selector][] and only allows tests to run on platforms that match the |
| 116 [platform selector][] and only allows a test to run on platforms that match the | 116 selector. It's often used with [specific tags](#configuring-tags) to ensure that |
| 117 selector. | 117 certain features will only be tested on supported platforms. |
| 118 | 118 |
| 119 [platform selector]: https://github.com/dart-lang/test/blob/master/README.md#pla
tform-selectors | 119 [platform selector]: https://github.com/dart-lang/test/blob/master/README.md#pla
tform-selectors |
| 120 | 120 |
| 121 ```yaml | 121 ```yaml |
| 122 tags: | 122 tags: |
| 123 # Internet Explorer doesn't support promises yet. | 123 # Internet Explorer doesn't support promises yet. |
| 124 promises: {test_on: "browser && !ie"} | 124 promises: {test_on: "browser && !ie"} |
| 125 ``` | 125 ``` |
| 126 | 126 |
| 127 The field can also be used at the top level of the configuration file to |
| 128 indicate that the entire package only supports a particular platform. If someone |
| 129 tries to run the tests on an unsupported platform, the runner will print a |
| 130 warning and skip that platform. |
| 131 |
| 132 ```yaml |
| 133 # This package uses dart:io. |
| 134 test_on: vm |
| 135 ``` |
| 136 |
| 127 ## Runner Configuration | 137 ## Runner Configuration |
| 128 | 138 |
| 129 Unlike [test configuration](#test-configuration), runner configuration affects | 139 Unlike [test configuration](#test-configuration), runner configuration affects |
| 130 the test runner as a whole rather than individual tests. It can only be used at | 140 the test runner as a whole rather than individual tests. It can only be used at |
| 131 the top level of the configuration file. | 141 the top level of the configuration file. |
| 132 | 142 |
| 133 ### `paths` | 143 ### `paths` |
| 134 | 144 |
| 135 This field indicates the default paths that the test runner should run. These | 145 This field indicates the default paths that the test runner should run. These |
| 136 paths are usually directories, although single filenames may be used as well. | 146 paths are usually directories, although single filenames may be used as well. |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 278 browser: | 288 browser: |
| 279 timeout: 2x | 289 timeout: 2x |
| 280 | 290 |
| 281 # Tests that spawn specific browsers. These automatically get the browser tag | 291 # Tests that spawn specific browsers. These automatically get the browser tag |
| 282 # as well. | 292 # as well. |
| 283 chrome: {add_tags: [browser]} | 293 chrome: {add_tags: [browser]} |
| 284 firefox: {add_tags: [browser]} | 294 firefox: {add_tags: [browser]} |
| 285 safari: {add_tags: [browser]} | 295 safari: {add_tags: [browser]} |
| 286 ie: {add_tags: [browser]} | 296 ie: {add_tags: [browser]} |
| 287 ``` | 297 ``` |
| OLD | NEW |