1- const webpack = require ( ' webpack' ) ;
2- const path = require ( ' path' ) ;
1+ const webpack = require ( " webpack" ) ;
2+ const path = require ( " path" ) ;
33
4- let reporters = [
5- process . env . TRAVIS ? 'dots' : 'progress' ,
6- 'coverage-istanbul'
7- ] ;
4+ let reporters = [ process . env . TRAVIS ? "dots" : "progress" , "coverage-istanbul" ] ;
85
9- module . exports = function ( config ) {
6+ module . exports = function ( config ) {
107 config . set ( {
8+ basePath : "" ,
119
12- basePath : '' ,
10+ frameworks : [ "mocha" , "sinon-chai" ] ,
1311
14- frameworks : [ 'mocha' , 'sinon-chai' ] ,
12+ files : [ "test/**/*.spec.js" ] ,
1513
16- files : [
17- 'test/**/*.spec.js'
18- ] ,
19-
20- exclude : [
21- ] ,
14+ exclude : [ ] ,
2215
2316 preprocessors : {
24- ' test/**/*.spec.js' : [ ' webpack' , ' sourcemap' ]
17+ " test/**/*.spec.js" : [ " webpack" , " sourcemap" ] ,
2518 } ,
2619
2720 reporters : reporters ,
@@ -34,59 +27,47 @@ module.exports = function(config) {
3427
3528 autoWatch : true ,
3629
37- browsers : [
38- 'FirefoxHeadless' ,
39- 'ChromeHeadless'
40- ] ,
30+ browsers : [ "FirefoxHeadless" , "ChromeHeadless" ] ,
4131
4232 singleRun : false ,
4333
4434 webpack : {
45- mode : ' development' ,
35+ mode : " development" ,
4636
4737 cache : true ,
48- devtool : ' inline-source-map' ,
38+ devtool : " inline-source-map" ,
4939 module : {
5040 rules : [
5141 {
5242 test : / \. j s $ / ,
5343 exclude : / n o d e _ m o d u l e s / ,
54- loader : ' babel-loader' ,
44+ loader : " babel-loader" ,
5545 options : {
56- presets : [ '@babel/preset-env' ]
57- }
58- } ,
59- {
60- test : / \. j s $ / ,
61- enforce : 'post' ,
62- use : {
63- loader : 'istanbul-instrumenter-loader' ,
64- options : {
65- esModules : true
66- }
46+ presets : [ "@babel/preset-env" ] ,
47+ plugins : [ "istanbul" ] ,
6748 } ,
68- include : path . resolve ( 'src/' )
69- }
70- ]
49+ } ,
50+ ] ,
7151 } ,
7252 plugins : [
7353 new webpack . DefinePlugin ( {
74- ' process.env.CI' : JSON . stringify ( process . env . CI ) ,
75- ' process.env.TRAVIS' : JSON . stringify ( process . env . TRAVIS )
76- } )
77- ]
54+ " process.env.CI" : JSON . stringify ( process . env . CI ) ,
55+ " process.env.TRAVIS" : JSON . stringify ( process . env . TRAVIS ) ,
56+ } ) ,
57+ ] ,
7858 } ,
7959
8060 webpackServer : {
8161 stats : {
82- colors : true
83- }
62+ colors : true ,
63+ } ,
8464 } ,
65+
8566 coverageIstanbulReporter : {
86- reports : [ ' html' , ' lcovonly' , ' text-summary' ] ,
87- dir : path . join ( __dirname , ' coverage' ) ,
67+ reports : [ " html" , " lcovonly" , " text-summary" ] ,
68+ dir : path . join ( __dirname , " coverage" ) ,
8869 combineBrowserReports : true ,
89- fixWebpackSourcePaths : true
90- }
70+ fixWebpackSourcePaths : true ,
71+ } ,
9172 } ) ;
9273} ;
0 commit comments