-
Notifications
You must be signed in to change notification settings - Fork 64
/
Copy pathkarma.conf.js
42 lines (42 loc) · 1.03 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/config.test');
module.exports = config => {
config.set({
basePath: '',
frameworks: ['source-map-support', 'mocha', 'sinon'],
files: [
'src/tests.js',
],
exclude: [],
preprocessors: {
'src/tests.js': ['webpack', 'sourcemap'],
},
reporters: ['mocha', 'coverage', 'coveralls'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: [/* 'Chrome', */'PhantomJS'],
singleRun: false,
webpack: webpackConfig,
webpackMiddleware: {
noInfo: true,
},
plugins: [
'karma-chai',
'karma-chrome-launcher',
'karma-coverage',
'karma-coveralls',
'karma-mocha',
'karma-mocha-reporter',
'karma-phantomjs-launcher',
'karma-sinon',
'karma-source-map-support',
'karma-sourcemap-loader',
'karma-webpack',
],
coverageReporter: {
type: 'lcov', // lcov or lcovonly are required for generating lcov.info files
dir: 'coverage/',
},
});
};