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

docs(tutorial/2 - Angular Templates): Running unit test without Firef… #13114

Closed
wants to merge 2 commits into from

Conversation

risan
Copy link
Contributor

@risan risan commented Oct 16, 2015

Running unit test without having Firefox installed throws error

I am following the tutorial on AngularJS website https://docs.angularjs.org/tutorial/step_02. However I got an error when running the provided unit test without having Firefox browser installed on my machine.

Console output:

INFO [karma]: Karma v0.12.37 server started at http://localhost:9876/
INFO [launcher]: Starting browser Chrome
INFO [launcher]: Starting browser Firefox
ERROR [launcher]: Cannot start Firefox
    Can not find the binary /Applications/Firefox.app/Contents/MacOS/firefox-bin
    Please set env variable FIREFOX_BIN
INFO [Chrome 46.0.2490 (Mac OS X 10.11.0)]: Connected on socket zZ0c0QemlSHXzVaqVGqC with id 90305753

I guess it will be much clearer if we also pointed out these browsers requirement on the tutorial documentation.

…ox installed throws error

I am following the tutorial on AngularJS website. However I got an error when running the provided unit test without having Firefox browser installed on my machine.

Console output:
```
INFO [karma]: Karma v0.12.37 server started at http://localhost:9876/
INFO [launcher]: Starting browser Chrome
INFO [launcher]: Starting browser Firefox
ERROR [launcher]: Cannot start Firefox
	Can not find the binary /Applications/Firefox.app/Contents/MacOS/firefox-bin
	Please set env variable FIREFOX_BIN
INFO [Chrome 46.0.2490 (Mac OS X 10.11.0)]: Connected on socket zZ0c0QemlSHXzVaqVGqC with id 90305753
``` 

I guess it will be much clearer if we also pointed out these browsers requirement on the tutorial documentation.
@@ -195,8 +195,15 @@ 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 browser automatically. Just ignore them and let them run in
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

browser --> browsers

…t test

Update docs for running the unit test using karma. Explain some extra configuration to make if user only has one browser either Chrome of Firefox.
@risan
Copy link
Contributor Author

risan commented Oct 16, 2015

Thanks for the review!

Just made some updates following your comments: 647407e

@gkalpak gkalpak closed this in 8088194 Oct 26, 2015
gkalpak pushed a commit that referenced this pull request Oct 26, 2015
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
@gkalpak
Copy link
Member

gkalpak commented Oct 26, 2015

Tweaked the wording a bit (to make more concise) and merged.
Backported to v1.4.x as fe17c0e.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants