This repository was archived by the owner on Aug 19, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 5 files changed +326
-167
lines changed Expand file tree Collapse file tree 5 files changed +326
-167
lines changed Original file line number Diff line number Diff line change 3
3
es
4
4
coverage
5
5
examples /dist
6
- node_modules
6
+ node_modules
Original file line number Diff line number Diff line change 1
1
module . exports = function ( config ) {
2
2
require ( './karma.conf.js' ) ( config ) ;
3
3
config . set ( {
4
+ webpack : {
5
+ module : {
6
+ rules : config . webpack . module . rules . concat ( [
7
+ {
8
+ test : / \. j s $ / ,
9
+ exclude : [ / n o d e _ m o d u l e s / ] ,
10
+ use : {
11
+ loader : 'babel-loader' ,
12
+ options : {
13
+ plugins : [ 'istanbul' ]
14
+ }
15
+ }
16
+ }
17
+ ] )
18
+ }
19
+ } ,
20
+ reporters : config . reporters . concat ( [ 'coverage' ] ) ,
21
+ plugins : config . plugins . concat ( [ 'karma-coverage' ] ) ,
4
22
coverageReporter : {
5
23
reporters : [
6
24
{
Original file line number Diff line number Diff line change 1
1
const path = require ( 'path' ) ;
2
2
3
- // Note: If we switch to ESM version of babelified files, we'll likely need to
4
- // update from the ancient isparta-loader. Likely we'll switch to:
5
- // https://github.com/istanbuljs/babel-plugin-istanbul with a `test` BABEL_ENV
6
- //
7
- // https://github.com/FormidableLabs/radium/issues/969
8
3
process . env . BABEL_ENV = 'commonjs' ;
9
4
10
5
module . exports = function ( config ) {
@@ -31,19 +26,7 @@ module.exports = function(config) {
31
26
{
32
27
test : / \. j s $ / ,
33
28
enforce : 'pre' ,
34
- include : path . resolve ( 'src/__tests__/' ) ,
35
- loader : 'babel-loader'
36
- } ,
37
- {
38
- test : / \. j s $ / ,
39
29
include : path . resolve ( 'src/' ) ,
40
- enforce : 'pre' ,
41
- exclude : / ( _ _ t e s t s _ _ | _ _ m o c k s _ _ ) / ,
42
- loader : 'isparta-loader?babel-loader'
43
- } ,
44
- {
45
- test : / \. j s $ / ,
46
- exclude : [ / n o d e _ m o d u l e s / ] ,
47
30
loader : 'babel-loader'
48
31
} ,
49
32
{
@@ -87,19 +70,15 @@ module.exports = function(config) {
87
70
flags : [ '--no-sandbox' ]
88
71
}
89
72
} ,
90
- reporters : [ 'mocha' , 'coverage' ] ,
73
+ reporters : [ 'mocha' ] ,
91
74
browserNoActivityTimeout : 60000 ,
92
75
plugins : [
93
76
'karma-chrome-launcher' ,
94
- 'karma-coverage' ,
95
77
'karma-mocha' ,
96
78
'karma-mocha-reporter' ,
97
79
'karma-sinon-chai' ,
98
80
'karma-webpack'
99
81
] ,
100
- coverageReporter : {
101
- type : 'text'
102
- } ,
103
82
browserConsoleLogOptions : {
104
83
level : 'log' ,
105
84
format : '%b %T: %m' ,
Original file line number Diff line number Diff line change 74
74
},
75
75
"devDependencies" : {
76
76
"babel-eslint" : " ^7.1.1" ,
77
+ "babel-plugin-istanbul" : " ^5.1.0" ,
77
78
"caniuse-api" : " ^2.0.0" ,
78
79
"chai" : " ^3.5.0" ,
79
80
"color" : " ^1.0.3" ,
89
90
"express-http-proxy" : " ^0.11.0" ,
90
91
"flow-bin" : " ^0.53.1" ,
91
92
"inject-loader" : " ^3.0.1" ,
92
- "isparta-loader" : " ^2.0.0" ,
93
93
"jsdom" : " ^12.0.0" ,
94
94
"jsdom-global" : " ^3.0.2" ,
95
95
"karma" : " ^3.0.0" ,
You can’t perform that action at this time.
0 commit comments