This repository was archived by the owner on Apr 16, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathkarma.conf.js
More file actions
63 lines (58 loc) · 1.32 KB
/
Copy pathkarma.conf.js
File metadata and controls
63 lines (58 loc) · 1.32 KB
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
61
62
63
module.exports = function (config) {
config.set({
browsers: ['PhantomJS'],
singleRun: true,
frameworks: ['mocha'],
files: [
'node_modules/babel-polyfill/dist/polyfill.js',
'./spec.webpack.js'
],
preprocessors: {
'spec.webpack.js': ['webpack', 'sourcemap']
},
plugins: [
'karma-mocha',
'karma-phantomjs-launcher',
'karma-sourcemap-loader',
'karma-webpack',
'karma-coverage',
'karma-mocha-reporter'
],
// reporters: ["mocha", "coverage"],
coverageReporter: {
reporters: [
{ type: 'text' },
{ type: 'html' },
{ type: 'json', file: 'coverage-karma.json' }
],
},
webpack: {
devtool: 'inline-source-map',
module: {
loaders: [
{ test: /\.(js|jsx)$/, exclude: /node_modules/, loader: 'babel-loader' }
],
postLoaders: [
{
test: /\.(js|jsx)$/,
exclude: /(tests\.webpack\.js|node_modules|\.spec\.js)/,
loader: 'istanbul-instrumenter'
},
],
},
resolve: {
alias: {
sinon: 'sinon/pkg/sinon-1.17.0.js'
},
},
server: {
noInfo: true,
silent: true,
},
},
webpackMiddleware: {
noInfo: true,
quiet: true,
},
});
};