| OLD | NEW |
| 1 `test` provides a standard way of writing and running tests in Dart. | 1 `test` provides a standard way of writing and running tests in Dart. |
| 2 | 2 |
| 3 ## Writing Tests | 3 ## Writing Tests |
| 4 | 4 |
| 5 Tests are specified using the top-level [`test()`][test] function, and test | 5 Tests are specified using the top-level [`test()`][test] function, and test |
| 6 assertions are made using [`expect()`][expect]: | 6 assertions are made using [`expect()`][expect]: |
| 7 | 7 |
| 8 [test]: http://www.dartdocs.org/documentation/test/latest/index.html#test/test@i
d_test | 8 [test]: http://www.dartdocs.org/documentation/test/latest/index.html#test/test@i
d_test |
| 9 [expect]: http://www.dartdocs.org/documentation/test/latest/index.html#test/test
@id_expect | 9 [expect]: http://www.dartdocs.org/documentation/test/latest/index.html#test/test
@id_expect |
| 10 | 10 |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 | 134 |
| 135 * `vm`: Whether the test is running on the command-line Dart VM. | 135 * `vm`: Whether the test is running on the command-line Dart VM. |
| 136 | 136 |
| 137 * `dartium`: Whether the test is running on Dartium. | 137 * `dartium`: Whether the test is running on Dartium. |
| 138 | 138 |
| 139 * `content-shell`: Whether the test is running on the headless Dartium content | 139 * `content-shell`: Whether the test is running on the headless Dartium content |
| 140 shell. | 140 shell. |
| 141 | 141 |
| 142 * `chrome`: Whether the test is running on Google Chrome. | 142 * `chrome`: Whether the test is running on Google Chrome. |
| 143 | 143 |
| 144 * `phantomjs`: Whether the test is running on |
| 145 [PhantomJS](http://phantomjs.org/). |
| 146 |
| 144 * `dart-vm`: Whether the test is running on the Dart VM in any context, | 147 * `dart-vm`: Whether the test is running on the Dart VM in any context, |
| 145 including Dartium. It's identical to `!js`. | 148 including Dartium. It's identical to `!js`. |
| 146 | 149 |
| 147 * `browser`: Whether the test is running in any browser. | 150 * `browser`: Whether the test is running in any browser. |
| 148 | 151 |
| 149 * `js`: Whether the test has been compiled to JS. This is identical to | 152 * `js`: Whether the test has been compiled to JS. This is identical to |
| 150 `!dart-vm`. | 153 `!dart-vm`. |
| 151 | 154 |
| 152 * `blink`: Whether the test is running in a browser that uses the Blink | 155 * `blink`: Whether the test is running in a browser that uses the Blink |
| 153 rendering engine. | 156 rendering engine. |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 307 | 310 |
| 308 In this case, the port is `8081`. In another terminal, pass this port to | 311 In this case, the port is `8081`. In another terminal, pass this port to |
| 309 `--pub-serve` and otherwise invoke `pub run test:test` as normal: | 312 `--pub-serve` and otherwise invoke `pub run test:test` as normal: |
| 310 | 313 |
| 311 ```shell | 314 ```shell |
| 312 $ pub run test:test --pub-serve=8081 -p chrome | 315 $ pub run test:test --pub-serve=8081 -p chrome |
| 313 "pub serve" is compiling test/my_app_test.dart... | 316 "pub serve" is compiling test/my_app_test.dart... |
| 314 "pub serve" is compiling test/utils_test.dart... | 317 "pub serve" is compiling test/utils_test.dart... |
| 315 00:00 +42: All tests passed! | 318 00:00 +42: All tests passed! |
| 316 ``` | 319 ``` |
| OLD | NEW |