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 10 matching lines...) Expand all Loading... |
21 | 21 |
22 # Sanity tests are quick and verify that nothing is obviously wrong. Declaring | 22 # Sanity tests are quick and verify that nothing is obviously wrong. Declaring |
23 # the tag allows us to tag tests with it without getting warnings. | 23 # the tag allows us to tag tests with it without getting warnings. |
24 sanity: | 24 sanity: |
25 ``` | 25 ``` |
26 | 26 |
27 * [Test Configuration](#test-configuration) | 27 * [Test Configuration](#test-configuration) |
28 * [`timeout`](#timeout) | 28 * [`timeout`](#timeout) |
29 * [`verbose_trace`](#verbose_trace) | 29 * [`verbose_trace`](#verbose_trace) |
30 * [`js_trace`](#js_trace) | 30 * [`js_trace`](#js_trace) |
| 31 * [`skip`](#skip) |
| 32 * [`test_on`](#test_on) |
31 * [Runner Configuration](#runner-configuration) | 33 * [Runner Configuration](#runner-configuration) |
32 * [`paths`](#paths) | 34 * [`paths`](#paths) |
33 * [`filename`](#filename) | 35 * [`filename`](#filename) |
34 * [`platforms`](#platforms) | 36 * [`platforms`](#platforms) |
35 * [`concurrency`](#concurrency) | 37 * [`concurrency`](#concurrency) |
36 * [`pub_serve`](#pub_serve) | 38 * [`pub_serve`](#pub_serve) |
37 * [`reporter`](#reporter) | 39 * [`reporter`](#reporter) |
38 * [Configuring Tags](#configuring-tags) | 40 * [Configuring Tags](#configuring-tags) |
39 * [`add_tags`](#add_tags) | 41 * [`add_tags`](#add_tags) |
40 | 42 |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 This boolean field controls whether or not stack traces caused by errors that | 87 This boolean field controls whether or not stack traces caused by errors that |
86 occur while running Dart compiled to JS are converted back to Dart style. This | 88 occur while running Dart compiled to JS are converted back to Dart style. This |
87 conversion uses the source map generated by `dart2js` to approximate the | 89 conversion uses the source map generated by `dart2js` to approximate the |
88 original Dart line, column, and in some cases member name for each stack frame. | 90 original Dart line, column, and in some cases member name for each stack frame. |
89 It defaults to `false`. | 91 It defaults to `false`. |
90 | 92 |
91 ```yaml | 93 ```yaml |
92 js_trace: true | 94 js_trace: true |
93 ``` | 95 ``` |
94 | 96 |
| 97 ### `skip` |
| 98 |
| 99 This field controls whether or not tests are skipped. It's usually applied to |
| 100 [specific tags](#configuring-tags) rather than used at the top level. Like the |
| 101 `skip` parameter for [`test()`][test], it can either be a boolean indicating |
| 102 whether the tests are skipped or a string indicating the reason they're skipped. |
| 103 |
| 104 [test]: https://www.dartdocs.org/documentation/test/0.12.10+2/test/test.html |
| 105 |
| 106 ```yaml |
| 107 tags: |
| 108 chrome: |
| 109 skip: "Our Chrome launcher is busted. See issue 1234." |
| 110 ``` |
| 111 |
| 112 ### `test_on` |
| 113 |
| 114 This field declares which platforms a test supports. It's usually applied to |
| 115 [specific tags](#configuring-tags) rather than used at the top level. It takes a |
| 116 [platform selector][] and only allows a test to run on platforms that match the |
| 117 selector. |
| 118 |
| 119 [platform selector]: https://github.com/dart-lang/test/blob/master/README.md#pla
tform-selectors |
| 120 |
| 121 ```yaml |
| 122 tags: |
| 123 # Internet Explorer doesn't support promises yet. |
| 124 promises: {test_on: "browser && !ie"} |
| 125 ``` |
| 126 |
95 ## Runner Configuration | 127 ## Runner Configuration |
96 | 128 |
97 Unlike [test configuration](#test-configuration), runner configuration affects | 129 Unlike [test configuration](#test-configuration), runner configuration affects |
98 the test runner as a whole rather than individual tests. It can only be used at | 130 the test runner as a whole rather than individual tests. It can only be used at |
99 the top level of the configuration file. | 131 the top level of the configuration file. |
100 | 132 |
101 ### `paths` | 133 ### `paths` |
102 | 134 |
103 This field indicates the default paths that the test runner should run. These | 135 This field indicates the default paths that the test runner should run. These |
104 paths are usually directories, although single filenames may be used as well. | 136 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... |
246 browser: | 278 browser: |
247 timeout: 2x | 279 timeout: 2x |
248 | 280 |
249 # Tests that spawn specific browsers. These automatically get the browser tag | 281 # Tests that spawn specific browsers. These automatically get the browser tag |
250 # as well. | 282 # as well. |
251 chrome: {add_tags: [browser]} | 283 chrome: {add_tags: [browser]} |
252 firefox: {add_tags: [browser]} | 284 firefox: {add_tags: [browser]} |
253 safari: {add_tags: [browser]} | 285 safari: {add_tags: [browser]} |
254 ie: {add_tags: [browser]} | 286 ie: {add_tags: [browser]} |
255 ``` | 287 ``` |
OLD | NEW |