1
- const webpack = require ( ' webpack' ) ;
2
- const path = require ( ' path' ) ;
1
+ const webpack = require ( " webpack" ) ;
2
+ const path = require ( " path" ) ;
3
3
4
- let reporters = [
5
- process . env . TRAVIS ? 'dots' : 'progress' ,
6
- 'coverage-istanbul'
7
- ] ;
4
+ let reporters = [ process . env . TRAVIS ? "dots" : "progress" , "coverage-istanbul" ] ;
8
5
9
- module . exports = function ( config ) {
6
+ module . exports = function ( config ) {
10
7
config . set ( {
8
+ basePath : "" ,
11
9
12
- basePath : '' ,
10
+ frameworks : [ "mocha" , "sinon-chai" ] ,
13
11
14
- frameworks : [ 'mocha' , 'sinon-chai' ] ,
12
+ files : [ "test/**/*.spec.js" ] ,
15
13
16
- files : [
17
- 'test/**/*.spec.js'
18
- ] ,
19
-
20
- exclude : [
21
- ] ,
14
+ exclude : [ ] ,
22
15
23
16
preprocessors : {
24
- ' test/**/*.spec.js' : [ ' webpack' , ' sourcemap' ]
17
+ " test/**/*.spec.js" : [ " webpack" , " sourcemap" ] ,
25
18
} ,
26
19
27
20
reporters : reporters ,
@@ -34,59 +27,47 @@ module.exports = function(config) {
34
27
35
28
autoWatch : true ,
36
29
37
- browsers : [
38
- 'FirefoxHeadless' ,
39
- 'ChromeHeadless'
40
- ] ,
30
+ browsers : [ "FirefoxHeadless" , "ChromeHeadless" ] ,
41
31
42
32
singleRun : false ,
43
33
44
34
webpack : {
45
- mode : ' development' ,
35
+ mode : " development" ,
46
36
47
37
cache : true ,
48
- devtool : ' inline-source-map' ,
38
+ devtool : " inline-source-map" ,
49
39
module : {
50
40
rules : [
51
41
{
52
42
test : / \. j s $ / ,
53
43
exclude : / n o d e _ m o d u l e s / ,
54
- loader : ' babel-loader' ,
44
+ loader : " babel-loader" ,
55
45
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" ] ,
67
48
} ,
68
- include : path . resolve ( 'src/' )
69
- }
70
- ]
49
+ } ,
50
+ ] ,
71
51
} ,
72
52
plugins : [
73
53
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
+ ] ,
78
58
} ,
79
59
80
60
webpackServer : {
81
61
stats : {
82
- colors : true
83
- }
62
+ colors : true ,
63
+ } ,
84
64
} ,
65
+
85
66
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" ) ,
88
69
combineBrowserReports : true ,
89
- fixWebpackSourcePaths : true
90
- }
70
+ fixWebpackSourcePaths : true ,
71
+ } ,
91
72
} ) ;
92
73
} ;
0 commit comments