repo: janusweb action: commit revision: path_from: revision_from: 36a095af4f5c0692e26be1352fc386aae864ed8b: path_to: revision_to:
commit 36a095af4f5c0692e26be1352fc386aae864ed8b Author: James BaicoianuDate: Sun May 29 15:43:28 2016 -0700 Run Karma tests from Travis-CI diff --git a/.travis.yml b/.travis.yml
--- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,11 @@ language: node_js node_js: - "0.10" -after_install: +before_install: + - export CHROME_BIN=chromium-browser + - export DISPLAY=:99.0 + - sh -e /etc/init.d/xvfb start + +before_script: - "./utils/build.sh" diff --git a/package.json b/package.json
--- a/package.json
+++ b/package.json
@@ -8,7 +8,14 @@
"scripts": {
"postinstall": "./utils/init.sh",
"build": "./utils/build.sh"
+ "test": "./node_modules/.bin/karma start tests/karma.conf.js --single-run "
},
+
+ 'devDependencies': {
+ 'karma': '~0.13',
+ 'jasmine': '>=2.0'
+ },
+
"repository": {
"type": "git",
"url": "https://github.com/jbaicoianu/janusweb"
diff --git a/tests/karma.conf.js b/tests/karma.conf.js
--- a/tests/karma.conf.js
+++ b/tests/karma.conf.js
@@ -2,7 +2,7 @@
// Generated on Sun May 08 2016 23:14:26 GMT-0700 (PDT)
module.exports = function(config) {
- config.set({
+ var settings = {
// base path that will be used to resolve all patterns (eg. files, exclude)
basePath: '..',
@@ -55,6 +55,13 @@ module.exports = function(config) {
// enable / disable watching file and executing tests whenever any file changes
autoWatch: true,
+ customLaunchers: {
+ Chrome_travis_ci: {
+ base: 'Chrome',
+ flags: ['--no-sandbox']
+ }
+ },
+
// start these browsers
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
@@ -68,5 +75,11 @@ module.exports = function(config) {
// Concurrency level
// how many browser should be started simultaneous
concurrency: Infinity
- })
+ };
+
+ if (process.env.TRAVIS) {
+ settings.browsers = ['Chrome_travis_ci'];
+ }
+
+ config.set(settings);
}
-----END OF PAGE-----