fix(cli): should not collect coverage from test dir

This commit is contained in:
chenjiahan 2020-11-12 10:49:07 +08:00
parent 21d52353ab
commit c2151708bb

View File

@ -21,7 +21,11 @@ const DEFAULT_CONFIG = {
transformIgnorePatterns: ['/node_modules/(?!(@vant/cli))/'],
snapshotSerializers: ['jest-serializer-vue'],
collectCoverage: true,
collectCoverageFrom: ['src/**/*.{js,jsx,ts,tsx,vue}', '!**/demo/**'],
collectCoverageFrom: [
'src/**/*.{js,jsx,ts,tsx,vue}',
'!**/demo/**',
'!**/test/**',
],
coverageReporters: ['html', 'lcov', 'text-summary'],
coverageDirectory: './test/coverage',
};