mirror of
https://github.com/wahyd4/vuepress.git
synced 2026-08-19 10:15:56 +10:00
41 lines
975 B
JavaScript
41 lines
975 B
JavaScript
// 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,
|
|
testURL: 'http://localhost/',
|
|
moduleFileExtensions: [
|
|
'js',
|
|
'vue'
|
|
],
|
|
testPathIgnorePatterns: [
|
|
'test.js',
|
|
path.resolve(__dirname, '../test')
|
|
],
|
|
// projects: [
|
|
// '<rootDir>/packages/@vuepress/*',
|
|
// {
|
|
// displayName: 'test',
|
|
// verbose: true,
|
|
// runner: 'jest',
|
|
// testURL: 'http://localhost/',
|
|
// testMatch: [
|
|
// '<rootDir>/packages/@vuepress/*.js'
|
|
// ]
|
|
// }
|
|
// ],
|
|
moduleNameMapper: {
|
|
'^@/(.*)$': '<rootDir>/$1'
|
|
},
|
|
transform: {
|
|
'^.+\\.js$': '<rootDir>/node_modules/babel-jest',
|
|
'.*\\.(vue)$': '<rootDir>/node_modules/vue-jest'
|
|
},
|
|
snapshotSerializers: [
|
|
'<rootDir>/node_modules/jest-serializer-vue'
|
|
]
|
|
}
|