From df7eeb7a88967f18b98af4c03c9f9690652296cb Mon Sep 17 00:00:00 2001 From: "weiran.zsd" Date: Wed, 17 Oct 2018 13:12:12 +0800 Subject: [PATCH] Revert "Revert "Build: Use karma-chrome-launcher to run tests (#10898)" (#10973)" This reverts commit 536611ae7e9b752b1c0dcc0e7f5def861a88aee0. --- karma.conf.js | 9 +++++++-- package.json | 3 +-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/karma.conf.js b/karma.conf.js index 0ffab8bc520..29a8cdc8f7b 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -67,8 +67,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 diff --git a/package.json b/package.json index dd3fe4615b3..818663a56eb 100644 --- a/package.json +++ b/package.json @@ -100,14 +100,13 @@ "karma-babel-preprocessor": "^7.0.0", "karma-mocha": "^1.3.0", "karma-mocha-reporter": "^2.2.3", - "karma-phantomjs-launcher": "^1.0.4", + "karma-chrome-launcher": "^2.2.0", "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", "shelljs": "^0.8.2", "sinon": "^3.3.0",