Skip to content

Commit 1d9fae7

Browse files
Merge pull request #92 from RobotlegsJS/headless-chrome
Migrate to Headless Chrome
2 parents bd75ab9 + 5d660b4 commit 1d9fae7

File tree

5 files changed

+137
-432
lines changed

5 files changed

+137
-432
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:

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424

2525
- Use karma-sinon-chai dependency (see #91).
2626

27+
- Migrate to headless Chrome (see #92).
28+
2729
- Update dev dependencies to latest version.
2830

2931
### [v0.2.0](https://github.com/RobotlegsJS/SignalsJS/releases/tag/0.2.0) - 2018-08-02

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

@@ -62,11 +65,11 @@ module.exports = config => {
6265
};
6366

6467
if (process.env.TRAVIS) {
65-
configuration.browsers.push("PhantomJS");
66-
configuration.plugins.push("karma-phantomjs-launcher");
68+
configuration.browsers.push("ChromeHeadless");
69+
configuration.plugins.push("karma-chrome-launcher");
6770
} else {
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
}
7174

7275
config.set(configuration);

package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
"@types/bluebird": "^3.5.24",
7171
"@types/chai": "^4.1.7",
7272
"@types/mocha": "^5.2.5",
73-
"@types/sinon": "^5.0.5",
73+
"@types/sinon": "^5.0.6",
7474
"bluebird": "^3.5.3",
7575
"browserify-versionify": "^1.0.6",
7676
"chai": "^4.2.0",
@@ -82,11 +82,11 @@
8282
"istanbul-instrumenter-loader": "^3.0.1",
8383
"karma": "^3.1.1",
8484
"karma-chai-sinon": "^0.1.5",
85+
"karma-chrome-launcher": "^2.2.0",
8586
"karma-coverage-istanbul-reporter": "^2.0.4",
8687
"karma-es6-shim": "^1.0.0",
8788
"karma-mocha": "^1.3.0",
8889
"karma-mocha-reporter": "^2.2.5",
89-
"karma-phantomjs-launcher": "^1.0.4",
9090
"karma-remap-istanbul": "^0.6.0",
9191
"karma-sinon-chai": "^2.0.2",
9292
"karma-sourcemap-loader": "^0.3.7",
@@ -96,6 +96,7 @@
9696
"nyc": "^13.1.0",
9797
"prettier": "^1.15.2",
9898
"publish-please": "^5.2.0",
99+
"puppeteer": "^1.10.0",
99100
"reflect-metadata": "^0.1.12",
100101
"remap-istanbul": "^0.12.0",
101102
"rimraf": "^2.6.2",
@@ -108,7 +109,7 @@
108109
"tslint-config-prettier": "^1.16.0",
109110
"typescript": "^3.1.6",
110111
"uglifyjs-webpack-plugin": "^2.0.1",
111-
"webpack": "^4.25.1",
112+
"webpack": "^4.26.0",
112113
"webpack-cli": "^3.1.2",
113114
"webpack-dev-server": "^3.1.10"
114115
}

0 commit comments

Comments
 (0)