I am trying to do unit tests with AngularJS. I already have bower and grunt installed, so I should be able to do the tests. However, when I run \"grunt test\" from the terminal
The browser binary path varies by OS.
Changing the path to the Chrome binary:
$ export CHROME_BIN=/usr/local/bin/my-chrome-build
Changing the path to the Chrome Canary binary:
$ export CHROME_CANARY_BIN=/usr/local/bin/my-chrome-build
Changing the path to the PhantomJs binary:
$ export PHANTOMJS_BIN=$HOME/local/bin/phantomjs
https://github.com/karma-runner/karma/blob/master/docs/config/03-browsers.md#correct-path-to-browser-binary
For Windows/Chrome, per the cmd box, this would be (by default)
C:\SET CHROME_BIN=C:\Program Files (x86)\Google\Chrome\Application\chrome.exe
You need to set CHROME_BIN
as a new environmental variable. Set the value to the path to chrome.exe
. This value is usually: C:/Program Files (x86)/Google/Chrome/Application/chrome.exe
Here are the docs that describe how to configure each type of OS.