Skip to content

Commit be1206b

Browse files
committed
add headless chrome to ci tests
1 parent 626f321 commit be1206b

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

Gruntfile.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ const fs = require('fs');
44
const mkdirp = require('mkdirp');
55
const path = require('path');
66
const config = require('./packages/core-js-builder/config');
7+
8+
process.env.CHROME_BIN = require('puppeteer').executablePath();
9+
710
module.exports = grunt => {
811
grunt.loadNpmTasks('grunt-contrib-clean');
912
grunt.loadNpmTasks('grunt-contrib-copy');
@@ -117,7 +120,13 @@ module.exports = grunt => {
117120
options: {
118121
frameworks: ['qunit'],
119122
basePath: '.',
120-
browsers: ['PhantomJS'],
123+
browsers: ['HeadlessChrome', 'PhantomJS'],
124+
customLaunchers: {
125+
HeadlessChrome: {
126+
base: 'ChromeHeadless',
127+
flags: ['--no-sandbox', '--disable-setuid-sandbox'],
128+
},
129+
},
121130
singleRun: true,
122131
},
123132
tests: {

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,15 @@
3232
"grunt-karma": "^3.0.0",
3333
"grunt-webpack": "^3.1.3",
3434
"karma": "^3.1.1",
35+
"karma-chrome-launcher": "^2.2.0",
3536
"karma-phantomjs-launcher": "1.0.x",
3637
"karma-qunit": "^2.1.0",
3738
"lerna": "2.11.0",
3839
"mkdirp": "^0.5.1",
3940
"moon-unit": "^0.2.2",
4041
"phantomjs-prebuilt": "2.1.x",
4142
"promises-aplus-tests": "^2.1.2",
43+
"puppeteer": "^1.10.0",
4244
"qunit": "2.8.x",
4345
"temp": "^0.8.3",
4446
"webpack": "^4.25.1"

0 commit comments

Comments
 (0)