Skip to content

Commit

Permalink
Add ability to test using Firefox browser.
Browse files Browse the repository at this point in the history
  • Loading branch information
mattmazzola committed Aug 23, 2016
1 parent 4d63a39 commit 1f43593
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
11 changes: 10 additions & 1 deletion karma.conf.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
var argv = require('yargs').argv;

var browserName = 'PhantomJS';
if (argv.chrome) {
browserName = 'Chrome'
}
else if (argv.firefox) {
browserName = 'Firefox'
}

module.exports = function (config) {
config.set({
frameworks: ['jasmine'],
Expand All @@ -12,8 +20,9 @@ module.exports = function (config) {
exclude: [],
reporters: argv.debug ? ['spec'] : ['spec', 'coverage'],
autoWatch: true,
browsers: [argv.chrome ? 'Chrome' : 'PhantomJS'],
browsers: [browserName],
plugins: [
'karma-firefox-launcher',
'karma-chrome-launcher',
'karma-jasmine',
'karma-spec-reporter',
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
"karma": "^0.13.19",
"karma-chrome-launcher": "^0.2.2",
"karma-coverage": "^0.5.3",
"karma-firefox-launcher": "^1.0.0",
"karma-jasmine": "^0.3.7",
"karma-phantomjs-launcher": "^1.0.0",
"karma-spec-reporter": "0.0.23",
Expand Down

0 comments on commit 1f43593

Please sign in to comment.