1
1
module . exports = function ( config ) {
2
2
config . set ( {
3
- // ... autres configs
4
- browsers : [ 'Chrome' , 'ChromeHeadless' ] ,
3
+ basePath : '' ,
4
+ frameworks : [ 'jasmine' , '@angular-devkit/build-angular' ] ,
5
+ plugins : [
6
+ require ( 'karma-jasmine' ) ,
7
+ require ( 'karma-chrome-launcher' ) ,
8
+ require ( 'karma-jasmine-html-reporter' ) ,
9
+ require ( 'karma-coverage' ) ,
10
+ require ( '@angular-devkit/build-angular/plugins/karma' )
11
+ ] ,
12
+ client : {
13
+ jasmine : {
14
+ // you can add configuration options for Jasmine here
15
+ // the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html
16
+ // for example, you can disable the random execution order
17
+ random : true
18
+ } ,
19
+ clearContext : false // leave Jasmine Spec Runner output visible in browser
20
+ } ,
21
+ jasmineHtmlReporter : {
22
+ suppressAll : true // removes the duplicated traces
23
+ } ,
24
+ coverageReporter : {
25
+ dir : require ( 'path' ) . join ( __dirname , './coverage/angular-starter' ) ,
26
+ subdir : '.' ,
27
+ reporters : [
28
+ { type : 'html' } ,
29
+ { type : 'text-summary' }
30
+ ]
31
+ } ,
32
+ reporters : [ 'progress' , 'kjhtml' ] ,
33
+ browsers : [ 'Chrome' ] ,
5
34
customLaunchers : {
6
35
ChromeHeadless : {
7
36
base : 'Chrome' ,
8
37
flags : [
9
38
'--headless' ,
10
39
'--disable-gpu' ,
11
40
'--no-sandbox' ,
12
- '--disable-dev-shm-usage'
41
+ '--disable-dev-shm-usage' ,
42
+ '--disable-web-security' ,
43
+ '--remote-debugging-port=9222'
13
44
]
14
45
}
15
- }
46
+ } ,
47
+ restartOnFileChange : true
16
48
} ) ;
17
49
} ;
0 commit comments