Skip to content

Commit

Permalink
Add travis. Execute CI tests with headless chrome.
Browse files Browse the repository at this point in the history
  • Loading branch information
lisathesecond committed Oct 29, 2017
1 parent 75d4067 commit 62a1657
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
6 changes: 6 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
language: node_js
node_js:
- "6"

# before_script:
# - npm run build
5 changes: 3 additions & 2 deletions karma.conf.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
// Karma configuration
// Generated on Thu Jan 19 2017 11:27:12 GMT+0100 (Paris, Madrid)
const webpackConfig = require('./webpack.config')

process.env.CHROME_BIN = require('puppeteer').executablePath()

// explained at http://mike-ward.net/2015/09/07/tips-on-setting-up-karma-testing-with-webpack/
webpackConfig.entry = ''

Expand Down Expand Up @@ -54,7 +55,7 @@ module.exports = function (config) {

// start these browsers
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
browsers: ['Chrome'],
browsers: [process.env.NODE_WATCH ? 'Chrome' : 'ChromeHeadless'],
// browsers: ['Chrome', 'Firefox', 'PhantomJS'],

// Continuous Integration mode
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
"karma-webpack": "^2.0.3",
"localforage": "^1.3.1",
"mocha": "^3.4.2",
"puppeteer": "^0.12.0",
"rimraf": "^2.6.2",
"size-limit": "^0.11.4",
"snazzy": "^7.0.0",
Expand Down

0 comments on commit 62a1657

Please sign in to comment.