1
1
/* global process */
2
2
// Karma configuration
3
3
4
- module . exports = function ( config ) {
4
+ module . exports = ( config ) => {
5
5
config . set ( {
6
6
7
7
// base path that will be used to resolve all patterns (eg. files, exclude)
@@ -13,7 +13,7 @@ module.exports = function(config) {
13
13
14
14
// list of files / patterns to load in the browser
15
15
files : [
16
- 'tests.webpack.js'
16
+ 'tests.webpack.js' ,
17
17
] ,
18
18
19
19
// list of files to exclude
@@ -24,7 +24,7 @@ module.exports = function(config) {
24
24
// available preprocessors:
25
25
// https://npmjs.org/browse/keyword/karma-preprocessor
26
26
preprocessors : {
27
- 'tests.webpack.js' : [ 'webpack' ]
27
+ 'tests.webpack.js' : [ 'webpack' ] ,
28
28
} ,
29
29
30
30
webpack : {
@@ -33,14 +33,17 @@ module.exports = function(config) {
33
33
{
34
34
test : / \. j s x ? $ / ,
35
35
loaders : [ 'babel-loader?cacheDirectory=true' ] ,
36
- exclude : / n o d e _ m o d u l e s /
37
- }
38
- ]
39
- }
36
+ exclude : / n o d e _ m o d u l e s / ,
37
+ } ,
38
+ ] ,
39
+ } ,
40
+ resolve : {
41
+ extensions : [ '.js' , '.jsx' , '.json' ] ,
42
+ } ,
40
43
} ,
41
44
42
45
webpackMiddleware : {
43
- noInfo : true
46
+ noInfo : true ,
44
47
} ,
45
48
46
49
// test results reporter to use
@@ -66,8 +69,8 @@ module.exports = function(config) {
66
69
// start these browsers
67
70
// available browser launchers:
68
71
// https://npmjs.org/browse/keyword/karma-launcher
69
- browsers : process . env . CONTINUOUS_INTEGRATION === 'true' ?
70
- [ 'Firefox' ] : [ 'Chrome' ] ,
72
+ browsers : process . env . CONTINUOUS_INTEGRATION === 'true'
73
+ ? [ 'Firefox' ] : [ 'Chrome' ] ,
71
74
72
75
// if true, Karma captures browsers, runs the tests and exits
73
76
singleRun : true ,
0 commit comments