1+ // Karma configuration file, see link for more information
2+ // https://karma-runner.github.io/1.0/config/configuration-file.html
3+
4+ module . exports = function ( config ) {
5+ config . set ( {
6+ basePath : '' ,
7+ frameworks : [ 'jasmine' , '@angular-devkit/build-angular' ] ,
8+ plugins : [
9+ require ( 'karma-jasmine' ) ,
10+ require ( 'karma-chrome-launcher' ) ,
11+ require ( 'karma-jasmine-html-reporter' ) ,
12+ require ( 'karma-coverage-istanbul-reporter' ) ,
13+ require ( '@angular-devkit/build-angular/plugins/karma' ) ,
14+ require ( 'karma-scss-preprocessor' )
15+ ] ,
16+ client : {
17+ clearContext : false // leave Jasmine Spec Runner output visible in browser
18+ } ,
19+ files : [ {
20+ pattern : '../node_modules/@angular/material/prebuilt-themes/indigo-pink.css' ,
21+ included : true ,
22+ watched : true
23+ } ,
24+ {
25+ pattern : './test.ts' ,
26+ watched : false
27+ } ,
28+ {
29+ pattern : './app/styles/**/*.*' ,
30+ watched : true ,
31+ included : true ,
32+ served : true
33+ }
34+ ] ,
35+ preprocessors : {
36+ './app/styles/**/*.*' : [ 'scss' ]
37+ } ,
38+ coverageIstanbulReporter : {
39+ dir : require ( 'path' ) . join ( __dirname , '../coverage' ) ,
40+ reports : [ 'html' , 'lcovonly' ] ,
41+ fixWebpackSourcePaths : true
42+ } ,
43+ reporters : [ 'progress' , 'kjhtml' ] ,
44+ port : 9876 ,
45+ colors : true ,
46+ logLevel : config . LOG_INFO ,
47+ autoWatch : true ,
48+ browsers : [ 'Chrome_travis_ci' ] ,
49+ singleRun : true ,
50+ customLaunchers : {
51+ Chrome_travis_ci : {
52+ base : 'Chrome' ,
53+ flags : [ '--no-sandbox' ]
54+ }
55+ } ,
56+ } ) ;
57+
58+ if ( process . env . TRAVIS ) {
59+ config . browsers = [ 'Chrome_travis_ci' ] ;
60+ }
61+ } ;
0 commit comments