| 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 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 | 144 * `phantomjs`: Whether the test is running on |
| 145 [PhantomJS](http://phantomjs.org/). | 145 [PhantomJS](http://phantomjs.org/). |
| 146 | 146 |
| 147 * `firefox`: Whether the test is running on Mozilla Firefox. |
| 148 |
| 149 * `safari`: Whether the test is running on Apple Safari. |
| 150 |
| 147 * `dart-vm`: Whether the test is running on the Dart VM in any context, | 151 * `dart-vm`: Whether the test is running on the Dart VM in any context, |
| 148 including Dartium. It's identical to `!js`. | 152 including Dartium. It's identical to `!js`. |
| 149 | 153 |
| 150 * `browser`: Whether the test is running in any browser. | 154 * `browser`: Whether the test is running in any browser. |
| 151 | 155 |
| 152 * `js`: Whether the test has been compiled to JS. This is identical to | 156 * `js`: Whether the test has been compiled to JS. This is identical to |
| 153 `!dart-vm`. | 157 `!dart-vm`. |
| 154 | 158 |
| 155 * `blink`: Whether the test is running in a browser that uses the Blink | 159 * `blink`: Whether the test is running in a browser that uses the Blink |
| 156 rendering engine. | 160 rendering engine. |
| (...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 353 | 357 |
| 354 In this case, the port is `8081`. In another terminal, pass this port to | 358 In this case, the port is `8081`. In another terminal, pass this port to |
| 355 `--pub-serve` and otherwise invoke `pub run test:test` as normal: | 359 `--pub-serve` and otherwise invoke `pub run test:test` as normal: |
| 356 | 360 |
| 357 ```shell | 361 ```shell |
| 358 $ pub run test:test --pub-serve=8081 -p chrome | 362 $ pub run test:test --pub-serve=8081 -p chrome |
| 359 "pub serve" is compiling test/my_app_test.dart... | 363 "pub serve" is compiling test/my_app_test.dart... |
| 360 "pub serve" is compiling test/utils_test.dart... | 364 "pub serve" is compiling test/utils_test.dart... |
| 361 00:00 +42: All tests passed! | 365 00:00 +42: All tests passed! |
| 362 ``` | 366 ``` |
| OLD | NEW |