11/*global __dirname, module*/
22
3- module . exports = function ( config ) {
3+ module . exports = function ( config ) {
44 config . set ( {
55 browsers : [ 'PhantomJS' ] ,
66 files : [
77 { pattern : require . resolve ( 'usertiming' ) , include : false } ,
88 { pattern : require . resolve ( 'jasmine-ajax' ) , include : true } ,
9- { pattern : 'node_modules/babel-polyfill/browser.js' , instrument : false } ,
9+ {
10+ pattern : 'node_modules/babel-polyfill/browser.js' ,
11+ instrument : false
12+ } ,
1013 { pattern : 'tests.webpack.js' , watched : false }
1114 ] ,
12- frameworks : [
13- 'jasmine'
14- ] ,
15+ frameworks : [ 'jasmine' ] ,
1516 preprocessors : {
1617 'src/**/*.js' : [ 'webpack' , 'sourcemap' ] ,
1718 'tests.webpack.js' : [ 'webpack' ]
@@ -33,17 +34,22 @@ module.exports = function (config) {
3334 {
3435 loader : 'babel-loader' ,
3536 options : {
36- presets : [ 'env' ] ,
37+ presets : [ '@babel/preset- env' ] ,
3738 plugins : [ 'babel-plugin-add-module-exports' ]
3839 }
39- } ,
40+ }
4041 ]
4142 } ,
4243 {
4344 test : / \. j s $ / ,
4445 enforce : 'post' ,
45- exclude : [ / t e s t s \. j s $ / , / ( n o d e _ m o d u l e s ) \/ / , / t e s t s \. w e b p a c k \. j s $ / ] ,
46- loader : 'istanbul-instrumenter-loader'
46+ exclude : [
47+ / t e s t s \. j s $ / ,
48+ / ( n o d e _ m o d u l e s ) \/ / ,
49+ / t e s t s \. w e b p a c k \. j s $ /
50+ ] ,
51+ loader : 'istanbul-instrumenter-loader' ,
52+ options : { esModules : true }
4753 }
4854 ]
4955 }
@@ -52,7 +58,6 @@ module.exports = function (config) {
5258 noInfo : true
5359 } ,
5460 coverageIstanbulReporter : {
55-
5661 // reports can be any that are listed here: https://github.com/istanbuljs/istanbul-reports/tree/590e6b0089f67b723a1fdf57bc7ccc080ff189d7/lib
5762 reports : [ 'html' , 'lcovonly' , 'text-summary' ] ,
5863
@@ -67,33 +72,31 @@ module.exports = function (config) {
6772
6873 // Most reporters accept additional config options. You can pass these through the `report-config` option
6974 'report-config' : {
70-
7175 // all options available at: https://github.com/istanbuljs/istanbul-reports/blob/590e6b0089f67b723a1fdf57bc7ccc080ff189d7/lib/html/index.js#L135-L137
7276 html : {
7377 // outputs the report in ./coverage/html
7478 subdir : 'html'
7579 }
76-
7780 } ,
7881
7982 // enforce percentage thresholds
8083 // anything under these percentages will cause karma to fail with an exit code of 1 if not running in watch mode
8184 thresholds : {
8285 emitWarning : false , // set to `true` to not fail the test command when thresholds are not met
83- global : { // thresholds for all files
84- statements : 93 ,
86+ global : {
87+ // thresholds for all files
88+ statements : 92 ,
8589 branches : 84 ,
86- functions : 93 ,
90+ functions : 92 ,
8791 lines : 95
88- } //,
92+ } //,
8993 //each: { // thresholds per file
9094 // statements: 100,
9195 // lines: 100,
9296 // branches: 100,
9397 // functions: 100
9498 //}
9599 }
96-
97- } ,
100+ }
98101 } ) ;
99102} ;
0 commit comments