Skip to content

Commit 4f7fa50

Browse files
committed
use headless chrome
1 parent 5959efc commit 4f7fa50

File tree

4 files changed

+77
-333
lines changed

4 files changed

+77
-333
lines changed

.travis.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
dist: trusty
2+
addons:
3+
chrome: stable
14
language: node_js
25
node_js:
36
- stable
@@ -14,7 +17,7 @@ before_install:
1417
before_script:
1518
- greenkeeper-lockfile-update
1619
script:
17-
- node_modules/karma/bin/karma start karma.conf.js --single-run
20+
- yarn test
1821
after_script:
1922
- greenkeeper-lockfile-upload
2023
after_success:

karma.conf.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1+
const puppeteer = require("puppeteer");
2+
13
process.env.TEST = true;
24
process.env.NODE_ENV = "test";
5+
process.env.CHROME_BIN = puppeteer.executablePath();
36

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

@@ -66,11 +69,11 @@ module.exports = config => {
6669
};
6770

6871
if (process.env.TRAVIS) {
69-
configuration.browsers.push("PhantomJS");
70-
configuration.plugins.push("karma-phantomjs-launcher");
72+
configuration.browsers.push("ChromeHeadless");
73+
configuration.plugins.push("karma-chrome-launcher");
7174
} else {
72-
configuration.browsers.push("PhantomJS");
73-
configuration.plugins.push("karma-phantomjs-launcher");
75+
configuration.browsers.push("ChromeHeadless");
76+
configuration.plugins.push("karma-chrome-launcher");
7477
}
7578

7679
config.set(configuration);

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@
7575
"karma-es6-shim": "^1.0.0",
7676
"karma-mocha": "^1.3.0",
7777
"karma-mocha-reporter": "^2.2.5",
78-
"karma-phantomjs-launcher": "^1.0.4",
7978
"karma-remap-istanbul": "^0.6.0",
8079
"karma-sinon": "^1.0.5",
8180
"karma-sinon-chai": "^2.0.2",
@@ -86,6 +85,7 @@
8685
"phaser-ce": "^2.11.1",
8786
"prettier": "^1.15.2",
8887
"publish-please": "^5.4.0",
88+
"puppeteer": "^1.10.0",
8989
"reflect-metadata": "^0.1.12",
9090
"remap-istanbul": "^0.12.0",
9191
"rimraf": "^2.6.2",

0 commit comments

Comments
 (0)