fix: test coverage
This commit is contained in:
@@ -26,6 +26,7 @@ const webpackConfig = {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
],
|
],
|
||||||
|
stats: 'errors-only',
|
||||||
resolve: {
|
resolve: {
|
||||||
modules: [
|
modules: [
|
||||||
path.resolve(process.cwd(), 'node_modules'),
|
path.resolve(process.cwd(), 'node_modules'),
|
||||||
|
|||||||
@@ -3,9 +3,3 @@ require('packages/vant-css/src/index.css');
|
|||||||
// require all test files (files that ends with .spec.js)
|
// require all test files (files that ends with .spec.js)
|
||||||
const testsReq = require.context('./specs', true, /\.spec$/);
|
const testsReq = require.context('./specs', true, /\.spec$/);
|
||||||
testsReq.keys().forEach(testsReq);
|
testsReq.keys().forEach(testsReq);
|
||||||
|
|
||||||
// require all src files except main.js for coverage.
|
|
||||||
// you can also change this to match only the subset of files that
|
|
||||||
// you want coverage for.
|
|
||||||
const srcReq = require.context('../../src', true, /^\.\/(?!main(\.js)?$)/);
|
|
||||||
srcReq.keys().forEach(srcReq);
|
|
||||||
|
|||||||
Reference in New Issue
Block a user