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: node_js:
- "0.10" - "0.10"
before_script: before_script:
- "sudo apt-get install -y chromium-browser" - "sudo apt-get install -y chromium-browser firefox"
notifications: notifications:
email: email:
on_success: never on_success: never

View File

@ -50,14 +50,14 @@ module.exports = function(config) {
// enable / disable watching file and executing tests whenever any file changes // enable / disable watching file and executing tests whenever any file changes
autoWatch: true, autoWatch: false,
// 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: ["chromium_no_sandbox"], browsers: ["Chromium", "Firefox"],
customLaunchers: { customLaunchers: {
chromium_no_sandbox: { Chromium: {
base: "Chrome", base: "Chrome",
flags: ["--no-sandbox"], flags: ["--no-sandbox"],
}, },
@ -66,6 +66,6 @@ module.exports = function(config) {
// Continuous Integration mode // Continuous Integration mode
// if true, Karma captures browsers, runs the tests and exits // 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" "./lib/crypto.js": "./lib/crypto.browser.js"
}, },
"scripts": { "scripts": {
"test": "mocha && xvfb-run -a karma start --single-run && jshint .", "test": "mocha && xvfb-run -a karma start && jshint .",
"karma": "xvfb-run -a karma start" "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": { "repository": {
"type": "git", "type": "git",
@ -34,6 +38,7 @@
"karma-browserify": "^1.0.1", "karma-browserify": "^1.0.1",
"karma-chrome-launcher": "^0.1.7", "karma-chrome-launcher": "^0.1.7",
"karma-cli": "~0.0.4", "karma-cli": "~0.0.4",
"karma-firefox-launcher": "^0.1.3",
"karma-mocha": "^0.1.10", "karma-mocha": "^0.1.10",
"karma-mocha-reporter": "^0.3.1", "karma-mocha-reporter": "^0.3.1",
"mocha": "*" "mocha": "*"