@@ -12,7 +12,8 @@ module.exports = (config) => {
1212      require ( 'karma-sauce-launcher' ) , 
1313      require ( 'karma-chrome-launcher' ) , 
1414      require ( 'karma-firefox-launcher' ) , 
15-       require ( 'karma-sourcemap-loader' ) 
15+       require ( 'karma-sourcemap-loader' ) , 
16+       require ( 'karma-coverage' ) 
1617    ] , 
1718    files : [ 
1819      { pattern : 'dist/vendor/core-js/client/core.js' ,  included : true ,  watched : false } , 
@@ -50,16 +51,23 @@ module.exports = (config) => {
5051
5152    customLaunchers : customLaunchers , 
5253
53-     exclude : [ ] , 
5454    preprocessors : { 
55-       '**/*.js' : [ 'sourcemap' ] 
55+       'dist/@angular/material/ **/*.js' : [ 'sourcemap' ] 
5656    } , 
57+ 
5758    reporters : [ 'dots' ] , 
59+ 
5860    port : 9876 , 
5961    colors : true , 
6062    logLevel : config . LOG_INFO , 
6163    autoWatch : false , 
6264
65+     coverageReporter : { 
66+       type  : 'json-summary' , 
67+       dir  : 'dist/coverage/' , 
68+       subdir : '.' 
69+     } , 
70+ 
6371    sauceLabs : { 
6472      testName : 'material2' , 
6573      startConnect : false , 
@@ -92,6 +100,11 @@ module.exports = (config) => {
92100  if  ( process . env [ 'TRAVIS' ] )  { 
93101    let  buildId  =  `TRAVIS #${ process . env . TRAVIS_BUILD_NUMBER } ${ process . env . TRAVIS_BUILD_ID }  ; 
94102
103+     if  ( process . env [ 'TRAVIS_PULL_REQUEST' ]  ===  'false' )  { 
104+       config . preprocessors [ 'dist/@angular/material/**/!(*+(.|-)spec).js' ]  =  [ 'coverage' ] ; 
105+       config . reporters . push ( 'coverage' ) ; 
106+     } 
107+ 
95108    // The MODE variable is the indicator of what row in the test matrix we're running. 
96109    // It will look like <platform>_<alias>, where platform is one of 'saucelabs' or 'browserstack', 
97110    // and alias is one of the keys in the CI configuration variable declared in 
0 commit comments