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

Commit

Permalink
docs(tutorial): add a note about Chrome or Firefox not being available
Browse files Browse the repository at this point in the history
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
  • Loading branch information
risan authored and gkalpak committed Oct 26, 2015
1 parent e403682 commit fe17c0e
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions docs/content/tutorial/step_02.ngdoc
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,19 @@ to ensure that Karma and its necessary plugins are installed. You can do this by

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

* Karma will start a new instance of Chrome browser automatically. Just ignore it and let it run in
the background. Karma will use this browser for test execution.
* Karma will start new instances of Chrome and Firefox browsers automatically. Just ignore them and
let them run in the background. Karma will use these browsers for test execution.
* If you only have one of the browsers installed on your machine (either Chrome or Firefox), make
sure to update the karma configuration file before running the test. Locate the configuration file
in `test/karma.conf.js`, then update the `browsers` property.

E.g. if you only have Chrome installed:
<pre>
...
browsers: ['Chrome'],
...
</pre>

* You should see the following or similar output in the terminal:

<pre>
Expand Down Expand Up @@ -250,7 +261,7 @@ browser is limited, which results in your karma tests running extremely slow.
<tr><th>row number</th></tr>
<tr ng-repeat="i in [0, 1, 2, 3, 4, 5, 6, 7]"><td>{{i+1}}</td></tr>
</table>

Extra points: try and make an 8x8 table using an additional `ng-repeat`.

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

0 comments on commit fe17c0e

Please sign in to comment.