Skip to content

Commit cd2bf89

Browse files
committed
use headless chrome
1 parent a694470 commit cd2bf89

File tree

4 files changed

+78
-296
lines changed

4 files changed

+78
-296
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-
- yarn run test
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

@@ -65,11 +68,11 @@ module.exports = config => {
6568
};
6669

6770
if (process.env.TRAVIS) {
68-
configuration.browsers.push("PhantomJS");
69-
configuration.plugins.push("karma-phantomjs-launcher");
71+
configuration.browsers.push("ChromeHeadless");
72+
configuration.plugins.push("karma-chrome-launcher");
7073
} else {
71-
configuration.browsers.push("PhantomJS");
72-
configuration.plugins.push("karma-phantomjs-launcher");
74+
configuration.browsers.push("ChromeHeadless");
75+
configuration.plugins.push("karma-chrome-launcher");
7376
}
7477

7578
config.set(configuration);

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@
8989
"karma-es6-shim": "^1.0.0",
9090
"karma-mocha": "^1.3.0",
9191
"karma-mocha-reporter": "^2.2.5",
92-
"karma-phantomjs-launcher": "^1.0.4",
9392
"karma-remap-istanbul": "^0.6.0",
9493
"karma-sinon": "^1.0.5",
9594
"karma-sinon-chai": "^2.0.2",
@@ -100,6 +99,7 @@
10099
"nyc": "^13.1.0",
101100
"prettier": "^1.15.2",
102101
"publish-please": "^5.2.0",
102+
"puppeteer": "^1.10.0",
103103
"reflect-metadata": "^0.1.12",
104104
"remap-istanbul": "^0.12.0",
105105
"rimraf": "^2.6.2",

0 commit comments

Comments
 (0)