2
2
// https://karma-runner.github.io/1.0/config/configuration-file.html
3
3
4
4
module . exports = function ( config ) {
5
+ const browsers = [ ] ;
6
+ if ( process . env . CHROME_BIN ) {
7
+ browsers . push ( 'ChromeHeadless' ) ;
8
+ } else if ( process . env . CHROMIUM_BIN ) {
9
+ browsers . push ( 'ChromiumHeadless' ) ;
10
+ }
11
+ if ( browsers . length === 0 ) {
12
+ if ( process . platform === 'win32' ) {
13
+ browsers . push ( 'EdgeHeadless' ) ;
14
+ } else {
15
+ browsers . push ( 'ChromiumHeadless' ) ;
16
+ }
17
+ }
18
+
5
19
config . set ( {
6
20
basePath : '' ,
7
21
frameworks : [ 'jasmine' , '@angular-devkit/build-angular' ] ,
@@ -19,7 +33,8 @@ module.exports = function (config) {
19
33
// for example, you can disable the random execution with `random: false`
20
34
// or set a specific seed with `seed: 4321`
21
35
} ,
22
- clearContext : false // leave Jasmine Spec Runner output visible in browser
36
+ clearContext : false , // leave Jasmine Spec Runner output visible in browser
37
+ sourceMapSupport : true
23
38
} ,
24
39
jasmineHtmlReporter : {
25
40
suppressAll : true // removes the duplicated traces
@@ -35,7 +50,7 @@ module.exports = function (config) {
35
50
logLevel : config . LOG_INFO ,
36
51
browserConsoleLogOptions : { level : 'info' } ,
37
52
autoWatch : true ,
38
- browsers : [ 'ChromeHeadless' ] ,
53
+ browsers : browsers ,
39
54
singleRun : true ,
40
55
restartOnFileChange : true
41
56
} ) ;
0 commit comments