Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build: Add karma-chrome-launcher support #11027

Merged
merged 3 commits into from Jan 4, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 9 additions & 2 deletions karma.conf.js
@@ -1,5 +1,7 @@
"use strict";

process.env.CHROME_BIN = require("puppeteer").executablePath();

module.exports = function(config) {
config.set({

Expand Down Expand Up @@ -67,8 +69,13 @@ module.exports = function(config) {

// start these browsers
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
browsers: ["PhantomJS"],

browsers: ["HeadlessChrome"],
customLaunchers: {
HeadlessChrome: {
base: 'ChromeHeadless',
flags: [ '--no-sandbox', ],
},
},

// Continuous Integration mode
// if true, Karma captures browsers, runs the tests and exits
Expand Down
4 changes: 2 additions & 2 deletions package.json
Expand Up @@ -98,17 +98,17 @@
"jsdoc": "^3.5.5",
"karma": "^3.0.0",
"karma-babel-preprocessor": "^7.0.0",
"karma-chrome-launcher": "^2.2.0",
"karma-mocha": "^1.3.0",
"karma-mocha-reporter": "^2.2.3",
"karma-phantomjs-launcher": "^1.0.4",
"leche": "^2.2.3",
"load-perf": "^0.2.0",
"markdownlint": "^0.11.0",
"mocha": "^5.0.5",
"mock-fs": "^4.6.0",
"npm-license": "^0.3.3",
"phantomjs-prebuilt": "^2.1.16",
"proxyquire": "^2.0.1",
"puppeteer": "^1.9.0",
"shelljs": "^0.8.2",
"sinon": "^3.3.0",
"temp": "^0.8.3",
Expand Down