Karma: use PhantomJS instead of Chrome

Chrome cannot be specified as a dependency and installed automatically,
but PhantomJS can. Most Linux distros use Chromium instead of Chrome, which Karma
does not recognize.
This commit is contained in:
Dan Ross
2014-10-24 17:25:31 +03:00
parent 7451109d2a
commit d926e77dca
2 changed files with 3 additions and 4 deletions

View File

@@ -21,9 +21,8 @@ flux-react extension to React JS. Read more about FLUX over at [Facebook Flux](h
### Run all tests with Karma ### Run all tests with Karma
* Run `npm test` * Run `npm test`
Karma will launch Chrome and run the tests once. If you need to run tests on a server with Karma will launch PhantomJS and run the tests once. If you need to run tests in a GUI browser, either change `karma.conf.js` to use Chrome or Firefox, or manually start it with:
PhantomJS, either change `karma.conf.js` to use PhantomJS or manually start it with: `./node_modules/karma/bin/karma start --single-run --browsers Chrome`
`./node_modules/karma/bin/karma start --single-run --browsers PhantomJS`
### Minify the code, ready for production ### Minify the code, ready for production
* Run `gulp deploy` * Run `gulp deploy`

View File

@@ -63,7 +63,7 @@ module.exports = function(config) {
// start these browsers // start these browsers
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
//browsers: ['Chrome', 'Firefox', 'PhantomJS'], //browsers: ['Chrome', 'Firefox', 'PhantomJS'],
browsers: ['Chrome'], browsers: ['PhantomJS'],
// Continuous Integration mode // Continuous Integration mode