Run tests on Firefox with karma as well

This commit is contained in:
Kagami Hiiragi 2014-12-18 23:15:07 +03:00
parent c055a8d155
commit 9abde09e49
3 changed files with 12 additions and 7 deletions

View File

@ -2,7 +2,7 @@ language: node_js
node_js:
- "0.10"
before_script:
- "sudo apt-get install -y chromium-browser"
- "sudo apt-get install -y chromium-browser firefox"
notifications:
email:
on_success: never

View File

@ -50,14 +50,14 @@ module.exports = function(config) {
// enable / disable watching file and executing tests whenever any file changes
autoWatch: true,
autoWatch: false,
// start these browsers
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
browsers: ["chromium_no_sandbox"],
browsers: ["Chromium", "Firefox"],
customLaunchers: {
chromium_no_sandbox: {
Chromium: {
base: "Chrome",
flags: ["--no-sandbox"],
},
@ -66,6 +66,6 @@ module.exports = function(config) {
// Continuous Integration mode
// if true, Karma captures browsers, runs the tests and exits
singleRun: false,
singleRun: true,
});
};

View File

@ -8,8 +8,12 @@
"./lib/crypto.js": "./lib/crypto.browser.js"
},
"scripts": {
"test": "mocha && xvfb-run -a karma start --single-run && jshint .",
"karma": "xvfb-run -a karma start"
"test": "mocha && xvfb-run -a karma start && jshint .",
"m": "mocha",
"k": "xvfb-run -a karma start",
"kc": "xvfb-run -a karma start --browsers Chromium",
"kf": "xvfb-run -a karma start --browsers Firefox",
"j": "jshint ."
},
"repository": {
"type": "git",
@ -34,6 +38,7 @@
"karma-browserify": "^1.0.1",
"karma-chrome-launcher": "^0.1.7",
"karma-cli": "~0.0.4",
"karma-firefox-launcher": "^0.1.3",
"karma-mocha": "^0.1.10",
"karma-mocha-reporter": "^0.3.1",
"mocha": "*"