Skip to content

Commit d544853

Browse files
committed
Try running tests on headless chromium
1 parent 2b62057 commit d544853

File tree

3 files changed

+32
-2
lines changed

3 files changed

+32
-2
lines changed

karma.conf.js

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ module.exports = function (config) {
88
plugins: [
99
require('karma-jasmine'),
1010
require('karma-phantomjs-launcher'),
11+
require('karma-chrome-launcher'),
1112
require('karma-jasmine-html-reporter'),
1213
require('karma-coverage-istanbul-reporter'),
1314
require('@angular/cli/plugins/karma')
@@ -22,12 +23,23 @@ module.exports = function (config) {
2223
angularCli: {
2324
environment: 'dev'
2425
},
26+
customLaunchers: {
27+
ChromeHeadless: {
28+
base: 'Chromium',
29+
flags: [
30+
'--headless',
31+
'--disable-gpu',
32+
// Without a remote debugging port, Google Chrome exits immediately.
33+
'--remote-debugging-port=9222',
34+
],
35+
}
36+
},
2537
reporters: ['progress', 'kjhtml'],
2638
port: 9876,
2739
colors: true,
2840
logLevel: config.LOG_INFO,
2941
autoWatch: true,
30-
browsers: ['PhantomJS'],
42+
browsers: ['ChromeHeadless', 'PhantomJS'],
3143
singleRun: false
3244
});
3345
};

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@
5353
"jasmine-core": "~2.6.2",
5454
"jasmine-spec-reporter": "~4.1.0",
5555
"karma": "~1.7.0",
56+
"karma-chrome-launcher": "~2.1.1",
5657
"karma-cli": "~1.0.1",
5758
"karma-coverage-istanbul-reporter": "^1.2.1",
5859
"karma-jasmine": "~1.1.0",

yarn.lock

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1968,6 +1968,12 @@ fresh@0.5.0:
19681968
version "0.5.0"
19691969
resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.0.tgz#f474ca5e6a9246d6fd8e0953cfa9b9c805afa78e"
19701970

1971+
fs-access@^1.0.0:
1972+
version "1.0.1"
1973+
resolved "https://registry.yarnpkg.com/fs-access/-/fs-access-1.0.1.tgz#d6a87f262271cefebec30c553407fb995da8777a"
1974+
dependencies:
1975+
null-check "^1.0.0"
1976+
19711977
fs-exists-sync@^0.1.0:
19721978
version "0.1.0"
19731979
resolved "https://registry.yarnpkg.com/fs-exists-sync/-/fs-exists-sync-0.1.0.tgz#982d6893af918e72d08dec9e8673ff2b5a8d6add"
@@ -3080,6 +3086,13 @@ jsprim@^1.2.2:
30803086
json-schema "0.2.3"
30813087
verror "1.3.6"
30823088

3089+
karma-chrome-launcher@~2.1.1:
3090+
version "2.1.1"
3091+
resolved "https://registry.yarnpkg.com/karma-chrome-launcher/-/karma-chrome-launcher-2.1.1.tgz#216879c68ac04d8d5140e99619ba04b59afd46cf"
3092+
dependencies:
3093+
fs-access "^1.0.0"
3094+
which "^1.2.1"
3095+
30833096
karma-cli@~1.0.1:
30843097
version "1.0.1"
30853098
resolved "https://registry.yarnpkg.com/karma-cli/-/karma-cli-1.0.1.tgz#ae6c3c58a313a1d00b45164c455b9b86ce17f960"
@@ -3895,6 +3908,10 @@ nth-check@~1.0.1:
38953908
dependencies:
38963909
boolbase "~1.0.0"
38973910

3911+
null-check@^1.0.0:
3912+
version "1.0.0"
3913+
resolved "https://registry.yarnpkg.com/null-check/-/null-check-1.0.0.tgz#977dffd7176012b9ec30d2a39db5cf72a0439edd"
3914+
38983915
num2fraction@^1.2.2:
38993916
version "1.2.2"
39003917
resolved "https://registry.yarnpkg.com/num2fraction/-/num2fraction-1.2.2.tgz#6f682b6a027a4e9ddfa4564cd2589d1d4e669ede"
@@ -6122,7 +6139,7 @@ which-module@^1.0.0:
61226139
version "1.0.0"
61236140
resolved "https://registry.yarnpkg.com/which-module/-/which-module-1.0.0.tgz#bba63ca861948994ff307736089e3b96026c2a4f"
61246141

6125-
which@1, which@^1.2.12, which@^1.2.9, which@~1.2.10:
6142+
which@1, which@^1.2.1, which@^1.2.12, which@^1.2.9, which@~1.2.10:
61266143
version "1.2.14"
61276144
resolved "https://registry.yarnpkg.com/which/-/which-1.2.14.tgz#9a87c4378f03e827cecaf1acdf56c736c01c14e5"
61286145
dependencies:

0 commit comments

Comments
 (0)