Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit 8088194

Browse files
risangkalpak
authored andcommitted
docs(tutorial): add a note about Chrome or Firefox not being available
Based on the current configuration, Karma will run the tests on both Chrome and Firefox, which will result in an error if either browser is not available on the user's machine. This commit adds a note and directions on how to solve this. Closes #13114
1 parent 2c8d87e commit 8088194

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

docs/content/tutorial/step_02.ngdoc

+14-3
Original file line numberDiff line numberDiff line change
@@ -195,8 +195,19 @@ to ensure that Karma and its necessary plugins are installed. You can do this by
195195

196196
To run the tests, and then watch the files for changes: `npm test`.
197197

198-
* Karma will start a new instance of Chrome browser automatically. Just ignore it and let it run in
199-
the background. Karma will use this browser for test execution.
198+
* Karma will start new instances of Chrome and Firefox browsers automatically. Just ignore them and
199+
let them run in the background. Karma will use these browsers for test execution.
200+
* If you only have one of the browsers installed on your machine (either Chrome or Firefox), make
201+
sure to update the karma configuration file before running the test. Locate the configuration file
202+
in `test/karma.conf.js`, then update the `browsers` property.
203+
204+
E.g. if you only have Chrome installed:
205+
<pre>
206+
...
207+
browsers: ['Chrome'],
208+
...
209+
</pre>
210+
200211
* You should see the following or similar output in the terminal:
201212

202213
<pre>
@@ -250,7 +261,7 @@ browser is limited, which results in your karma tests running extremely slow.
250261
<tr><th>row number</th></tr>
251262
<tr ng-repeat="i in [0, 1, 2, 3, 4, 5, 6, 7]"><td>{{i+1}}</td></tr>
252263
</table>
253-
264+
254265
Extra points: try and make an 8x8 table using an additional `ng-repeat`.
255266

256267
* Make the unit test fail by changing `expect(scope.phones.length).toBe(3)` to instead use `toBe(4)`.

0 commit comments

Comments
 (0)