Skip to content

Commit

Permalink
use headless chrome
Browse files Browse the repository at this point in the history
  • Loading branch information
tiagoschenkel committed Nov 24, 2018
1 parent 5959efc commit 4f7fa50
Show file tree
Hide file tree
Showing 4 changed files with 77 additions and 333 deletions.
5 changes: 4 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
dist: trusty
addons:
chrome: stable
language: node_js
node_js:
- stable
Expand All @@ -14,7 +17,7 @@ before_install:
before_script:
- greenkeeper-lockfile-update
script:
- node_modules/karma/bin/karma start karma.conf.js --single-run
- yarn test
after_script:
- greenkeeper-lockfile-upload
after_success:
Expand Down
11 changes: 7 additions & 4 deletions karma.conf.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
const puppeteer = require("puppeteer");

process.env.TEST = true;
process.env.NODE_ENV = "test";
process.env.CHROME_BIN = puppeteer.executablePath();

const webpackConfig = require("./webpack.config.js")({ production: false, karma: true });

Expand Down Expand Up @@ -66,11 +69,11 @@ module.exports = config => {
};

if (process.env.TRAVIS) {
configuration.browsers.push("PhantomJS");
configuration.plugins.push("karma-phantomjs-launcher");
configuration.browsers.push("ChromeHeadless");
configuration.plugins.push("karma-chrome-launcher");
} else {
configuration.browsers.push("PhantomJS");
configuration.plugins.push("karma-phantomjs-launcher");
configuration.browsers.push("ChromeHeadless");
configuration.plugins.push("karma-chrome-launcher");
}

config.set(configuration);
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@
"karma-es6-shim": "^1.0.0",
"karma-mocha": "^1.3.0",
"karma-mocha-reporter": "^2.2.5",
"karma-phantomjs-launcher": "^1.0.4",
"karma-remap-istanbul": "^0.6.0",
"karma-sinon": "^1.0.5",
"karma-sinon-chai": "^2.0.2",
Expand All @@ -86,6 +85,7 @@
"phaser-ce": "^2.11.1",
"prettier": "^1.15.2",
"publish-please": "^5.4.0",
"puppeteer": "^1.10.0",
"reflect-metadata": "^0.1.12",
"remap-istanbul": "^0.12.0",
"rimraf": "^2.6.2",
Expand Down
Loading

0 comments on commit 4f7fa50

Please sign in to comment.