mirror of
https://github.com/wahyd4/vuepress.git
synced 2026-08-09 05:16:23 +10:00
chore: set rootDir in jest config (#528)
This commit is contained in:
+7
-4
@@ -1,20 +1,23 @@
|
||||
// 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'
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user