You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

43 lines
1.0 KiB

const base = require('./karma.base.config.js')
9 years ago
process.env.CHROME_BIN = require('puppeteer').executablePath()
9 years ago
module.exports = function (config) {
const options = Object.assign(base, {
browsers: ['ChromeHeadlessCI'],
customLaunchers: {
'ChromeHeadlessCI': {
base: 'ChromeHeadless',
flags: ['--no-sandbox']
}
},
reporters: ['mocha', 'coverage'],
9 years ago
coverageReporter: {
reporters: [
{ type: 'lcov', dir: '../../coverage', subdir: '.' },
{ type: 'text-summary', dir: '../../coverage', subdir: '.' }
9 years ago
]
},
singleRun: true,
plugins: base.plugins.concat([
'karma-coverage',
'karma-chrome-launcher'
])
9 years ago
})
// add babel-plugin-istanbul for code instrumentation
options.webpack.module.rules[0].options = {
plugins: [['istanbul', {
exclude: [
'test/',
'src/compiler/parser/html-parser.js',
'src/core/instance/proxy.js',
'src/sfc/deindent.js',
'src/platforms/weex/'
]
}]]
}
9 years ago
config.set(options)
}