11/* global process */
22// Karma configuration
33
4- module . exports = function ( config ) {
4+ module . exports = ( config ) => {
55 config . set ( {
66
77 // base path that will be used to resolve all patterns (eg. files, exclude)
@@ -13,7 +13,7 @@ module.exports = function(config) {
1313
1414 // list of files / patterns to load in the browser
1515 files : [
16- 'tests.webpack.js'
16+ 'tests.webpack.js' ,
1717 ] ,
1818
1919 // list of files to exclude
@@ -24,7 +24,7 @@ module.exports = function(config) {
2424 // available preprocessors:
2525 // https://npmjs.org/browse/keyword/karma-preprocessor
2626 preprocessors : {
27- 'tests.webpack.js' : [ 'webpack' ]
27+ 'tests.webpack.js' : [ 'webpack' ] ,
2828 } ,
2929
3030 webpack : {
@@ -33,14 +33,17 @@ module.exports = function(config) {
3333 {
3434 test : / \. j s x ? $ / ,
3535 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+ } ,
4043 } ,
4144
4245 webpackMiddleware : {
43- noInfo : true
46+ noInfo : true ,
4447 } ,
4548
4649 // test results reporter to use
@@ -66,8 +69,8 @@ module.exports = function(config) {
6669 // start these browsers
6770 // available browser launchers:
6871 // 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' ] ,
7174
7275 // if true, Karma captures browsers, runs the tests and exits
7376 singleRun : true ,
0 commit comments