Files
vuepress/scripts/jest.config.js
T
2018-08-14 02:43:11 +08:00

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'
]
}