forked from PeachScript/vue-infinite-loading
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkarma.conf.js
48 lines (45 loc) · 1.31 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
var webpackConfig = require('./webpack.config');
delete webpackConfig.entry;
// Add code coverage loader
webpackConfig.vue = {
loaders: {
js: 'isparta'
}
}
// remove eslint
delete webpackConfig.module.preLoaders;
// Karma configuration
module.exports = function(config) {
config.set({
// frameworks to use
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter
frameworks: ['mocha', 'chai'],
// list of files / patterns to load in the browser
files: [
'./test/unit/index.js'
],
// preprocess matching files before serving them to the browser
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
preprocessors: {
'./test/unit/index.js': 'webpack'
},
// start these browsers
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
browsers: ['PhantomJS'],
// test results reporter to use
// possible values: 'dots', 'progress'
// available reporters: https://npmjs.org/browse/keyword/karma-reporter
reporters: ['spec', 'coverage'],
coverageReporter: {
dir: './test/unit/coverage',
reporters: [
{ type: 'lcov', subdir: '.' },
{ type: 'text-summary' }
]
},
webpack: webpackConfig,
webpackMiddleware: {
noInfo: true
}
});
}