mirror of
https://github.com/youzan/vant.git
synced 2026-05-10 01:06:44 +08:00
feat(cli): add jest init file
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import {
|
||||
JEST_INIT_FILE,
|
||||
JEST_FILE_MOCK_FILE,
|
||||
JEST_STYLE_MOCK_FILE
|
||||
} from '../common/constant';
|
||||
@@ -8,6 +9,7 @@ module.exports = {
|
||||
'\\.(css|less|scss)$': JEST_STYLE_MOCK_FILE,
|
||||
'\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$': JEST_FILE_MOCK_FILE
|
||||
},
|
||||
setupFiles: [JEST_INIT_FILE],
|
||||
moduleFileExtensions: ['js', 'jsx', 'vue', 'ts', 'tsx'],
|
||||
transform: {
|
||||
'\\.(vue)$': 'vue-jest',
|
||||
@@ -18,9 +20,7 @@ module.exports = {
|
||||
collectCoverageFrom: [
|
||||
'src/**/*.{js,jsx,ts,tsx,vue}',
|
||||
'!**/style/**',
|
||||
'!**/demo/**',
|
||||
'!**/locale/lang/**',
|
||||
'!**/sku/**'
|
||||
'!**/demo/**'
|
||||
],
|
||||
collectCoverage: true,
|
||||
coverageReporters: ['html', 'lcov', 'text-summary'],
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
import Vue from 'vue';
|
||||
// @ts-ignore
|
||||
import Package from '../../dist/package-entry';
|
||||
|
||||
Vue.use(Package);
|
||||
Reference in New Issue
Block a user