Skip to content

Commit c0e91e2

Browse files
Update karma to run both firefox & chrome tests
1 parent 402dd22 commit c0e91e2

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

Diff for: Gruntfile.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -576,7 +576,11 @@ module.exports = function (grunt) {
576576
karma: {
577577
unit: {
578578
configFile: 'test/karma.conf.js',
579-
singleRun: true
579+
singleRun: true,
580+
// default in karma.conf.js is Firefox, however, Chrome has much better
581+
// error messages when writing tests. Call with chrome like this:
582+
// grunt test --browsers=Chrome
583+
browsers: grunt.option('browsers') ? [grunt.option('browsers')] : ['Firefox']
580584
}
581585
},
582586

Diff for: package.json

+1
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
"jasmine-spec-reporter": "1.1.2",
4242
"jshint-stylish": "0.2.0",
4343
"karma": "0.12.23",
44+
"karma-chrome-launcher": "^2.0.0",
4445
"karma-coverage": "0.2.6",
4546
"karma-firefox-launcher": "^1.0.0",
4647
"karma-jasmine": "0.1.5",

Diff for: test/karma.conf.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,9 @@ module.exports = function(config) {
7979
// - Safari (only Mac)
8080
// - PhantomJS
8181
// - IE (only Windows)
82-
browsers: ['Firefox'],
83-
// Which plugins to enable
8482
plugins: [
8583
'karma-firefox-launcher',
84+
'karma-chrome-launcher',
8685
'karma-ng-html2js-preprocessor',
8786
'karma-jasmine',
8887
'karma-coverage'

0 commit comments

Comments
 (0)