mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
fix: exclude test files when dist test coverage report
This commit is contained in:
parent
561821d03a
commit
17779384ee
@ -75,7 +75,21 @@ function getWebpackConfig(testFileName) {
|
||||
]
|
||||
},
|
||||
{
|
||||
test: /\.vue$/,
|
||||
test: /test\/unit\/components\/.*\.vue$|packages\/swipe\/.*\.vue$/,
|
||||
use: [
|
||||
{
|
||||
loader: 'vue-loader',
|
||||
options: {
|
||||
loaders: {
|
||||
css: ['style-loader', 'css-loader', 'postcss-loader']
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
test: /packages\/.*\.vue$/,
|
||||
exclude: /packages\/swipe\/.*\.vue$/,
|
||||
use: [
|
||||
{
|
||||
loader: 'vue-loader',
|
||||
|
@ -14,7 +14,8 @@ module.exports = function(config) {
|
||||
reporters: ['spec', 'coverage'],
|
||||
files: ['./index.js'],
|
||||
preprocessors: {
|
||||
'./index.js': ['webpack', 'sourcemap']
|
||||
'./index.js': ['webpack', 'sourcemap'],
|
||||
'test/unit/!(components)/**/*.vue': ['coverage']
|
||||
},
|
||||
webpack: getWebpackConfig(getTestFileName()),
|
||||
webpackMiddleware: {
|
||||
|
Loading…
x
Reference in New Issue
Block a user