-
Notifications
You must be signed in to change notification settings - Fork 4
/
karma.conf.js
50 lines (39 loc) · 947 Bytes
/
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
const baseConfig = require("./webpack.config.js");
const testConfig = {
mode: "development",
devtool: baseConfig.devtool,
externals: baseConfig.externals,
module: baseConfig.module,
resolve: baseConfig.resolve
};
module.exports = config => {
config.set({
browsers: ["Nightmare"],
frameworks: ["mocha", "chai"],
reporters: ["mocha"],
plugins: [
"karma-chai",
"karma-mocha",
"karma-mocha-reporter",
"karma-nightmare",
"karma-sourcemap-loader",
"karma-webpack"
],
files: ["test/**/*.test.js", "test/**/*.test.jsx"],
preprocessors: {
"test/**/*.test.js": ["webpack", "sourcemap"],
"test/**/*.test.jsx": ["webpack", "sourcemap"]
},
webpack: testConfig,
webpackMiddleware: {
stats: "errors-only"
},
nightmareOptions: {
show: false
},
mochaReporter: {
output: "minimal"
// showDiff: true
}
});
};