mirror of
https://gitee.com/vuejs/vue.git
synced 2024-12-05 05:27:59 +08:00
29 lines
673 B
JavaScript
29 lines
673 B
JavaScript
var base = require('./karma.base.config.js')
|
|
|
|
module.exports = function (config) {
|
|
var options = Object.assign(base, {
|
|
browsers: ['PhantomJS'],
|
|
reporters: ['progress', 'coverage'],
|
|
coverageReporter: {
|
|
reporters: [
|
|
{ type: 'lcov', dir: '../coverage', subdir: '.' },
|
|
{ type: 'text-summary', dir: '../coverage', subdir: '.' }
|
|
]
|
|
},
|
|
singleRun: true
|
|
})
|
|
|
|
// add babel-plugin-coverage for code intrumentation
|
|
options.webpack.babel = {
|
|
plugins: [['coverage', {
|
|
ignore: [
|
|
'test/',
|
|
'src/compiler/parser/html-parser.js',
|
|
'src/core/instance/proxy.js'
|
|
]
|
|
}]]
|
|
}
|
|
|
|
config.set(options)
|
|
}
|