-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkarma.conf.js
42 lines (41 loc) · 1.14 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
const webpackConfig = require('./webpack.karma.config');
module.exports = (config) => {
config.set({
browsers: ['Chrome'],
hostname: 'localhost',
port: 9050,
browserNoActivityTimeout: 60000,
// singleRun: true, //just run once by default
coverageReporter: {
dir: 'tmp/coverage/',
reporters: [
{ type: 'html', subdir: 'report-html' },
{ type: 'lcov', subdir: 'report-lcov' },
],
instrumenterOptions: {
istanbul: { noCompact: true },
},
},
files: ['frontend/**/*.spec.ts'],
frameworks: ['chai', 'mocha', 'sinon'],
reporters: ['mocha', 'coverage'],
preprocessors: {
'frontend/**/*.spec.ts': ['webpack', 'sourcemap', 'coverage'],
},
webpack: {
module: webpackConfig.module,
resolve: webpackConfig.resolve,
plugins: webpackConfig.plugins,
},
plugins: [
'karma-mocha',
'karma-chai', 'karma-coverage',
'karma-webpack', 'karma-phantomjs-launcher',
'karma-mocha-reporter', 'karma-sourcemap-loader',
'karma-babel-preprocessor', 'karma-sinon',
],
webpackMiddleware: {
noInfo: true,
},
});
};