提交 f9c39140 编写于 作者: L Liu Xinyu 提交者: ULIVZ

chore: set rootDir in jest config (#528)

上级 777c4f15
// https://github.com/facebook/jest/tree/master/packages/babel-jest
// TODO remove 'babel-core@^7.0.0-0' when babel-jest can work with '@babel/core'
const path = require('path')
module.exports = {
rootDir: path.resolve(__dirname, '..'),
verbose: true,
moduleFileExtensions: [
'js',
'vue'
],
moduleNameMapper: {
'^@/(.*)$': '<rootDir>/../lib/$1'
'^@/(.*)$': '<rootDir>/lib/$1'
},
transform: {
'^.+\\.js$': '<rootDir>/../node_modules/babel-jest',
'.*\\.(vue)$': '<rootDir>/../node_modules/vue-jest'
'^.+\\.js$': '<rootDir>/node_modules/babel-jest',
'.*\\.(vue)$': '<rootDir>/node_modules/vue-jest'
},
snapshotSerializers: [
'<rootDir>/../node_modules/jest-serializer-vue'
'<rootDir>/node_modules/jest-serializer-vue'
]
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册