forked from lakb248/vue-pull-refresh
-
Notifications
You must be signed in to change notification settings - Fork 0
/
karma.config.js
44 lines (42 loc) · 1.16 KB
/
karma.config.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
var webpack = require('webpack');
var baseConfig = require('./webpack.base.config');
var merge = require('webpack-merge');
delete baseConfig.entry;
// add isparta-loader to vue file
var webpackConfig = baseConfig;
webpackConfig.plugins = (baseConfig.plugins || []).concat([
new webpack.LoaderOptionsPlugin({
options: {
vue: {
loaders: {
js: 'isparta'
}
}
}
})
]);
module.exports = function(config) {
config.set({
browsers: ['PhantomJS'],
frameworks: ['jasmine'],
reporters: ['progress', 'coverage', 'verbose'],
// this is the entry file for all our tests.
files: ['./test/index.js'],
// we will pass the entry file to webpack for bundling.
preprocessors: {
'./test/index.js': ['webpack']
},
coverageReporter: {
dir: './coverage',
reporters: [
{type: 'html'},
{type: 'text-summary'}
]
},
webpack: webpackConfig,
webpackMiddleware: {
noInfo: true
},
singleRun: true
});
};