-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathkarma.conf.js
60 lines (50 loc) · 1.42 KB
/
karma.conf.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
/* eslint import/unambiguous:0 */
const webpack = require('webpack')
module.exports = function(config) {
config.set({
browsers: ['ChromeHeadless', 'ChromeCanaryHeadless', 'Firefox'],
files: [
'./src/*.test.js',
'./src/**/*.test.js',
'./src/*.client-test.js',
'./src/**/*.client-test.js',
],
preprocessors: {
'./src/**': ['webpack', 'sourcemap'],
},
frameworks: ['chai', 'mocha'],
plugins: [
'karma-chrome-launcher',
'karma-firefox-launcher',
'karma-chai',
'karma-mocha',
'karma-sourcemap-loader',
'karma-webpack',
'karma-mocha-reporter',
],
reporters: ['mocha'],
singleRun: true,
// webpack config object
webpack: {
devtool: '#inline-source-map',
plugins: [
new webpack.IgnorePlugin(/source-map-support/),
],
module: {
rules: [{
test: /\.js$/,
include: [
/src/,
],
exclude: [
/server-test\.js$/,
],
use: [{loader: 'babel-loader'}],
}],
},
},
webpackMiddleware: {
noInfo: true,
},
})
}