1 Star 0 Fork 24

爱则富/mand-mobile

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
jest.config.js 1.26 KB
一键复制 编辑 原始数据 按行查看 历史
shawnXu 提交于 2018-12-28 17:13 . test: update jest config
const TEST_TYPE = process.env.TEST_TYPE || 'components'
// const TEST_BUNDLE = TEST_TYPE === 'bundle' ? 'lib/mand-mobile.umd' : ''
module.exports = {
setupFiles: ['<rootDir>/test/jest.init.js'],
moduleFileExtensions: [
'js',
'json',
'vue'
],
transform: {
'.+\\.(css|styl|less|sass|scss|png|jpg|ttf|woff|woff2)$':
'jest-transform-stub',
'^.+\\.js$': 'babel-jest',
'.*\\.vue$': 'vue-jest',
'^.+\\.svg$': 'jest-svg-sprite-loader'
},
globals: {
'vue-jest': {
babelConfig: {
configFile: '<rootDir>/.babelrc'
}
}
},
modulePaths: [
'<rootDir>/components',
'<rootDir>/node_modules'
],
moduleNameMapper: {
'@examples(.*)': '<rootDir>/examples/$1',
'mand-mobile/lib(.*)': `<rootDir>/${TEST_TYPE}$1`,
'mand-mobile/components/picker/demo/data(.*)': '<rootDir>/components/picker/demo/data/$1',
'mand-mobile/components/tab-picker/demo/data(.*)': '<rootDir>/components/tab-picker/demo/data/$1',
'mand-mobile/components(.*)': `<rootDir>/${TEST_TYPE}$1`
},
snapshotSerializers: [
'jest-serializer-vue'
],
collectCoverage: true,
collectCoverageFrom: [
'components/*/*.{js,vue}'
],
coverageReporters: ['html', 'lcov', 'text-summary'],
coverageDirectory: './test/coverage'
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/iLvKinfy/mand-mobile.git
git@gitee.com:iLvKinfy/mand-mobile.git
iLvKinfy
mand-mobile
mand-mobile
master

搜索帮助