forked from brophdawg11/vue-ssr-build
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
30 lines (30 loc) · 895 Bytes
/
jest.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
module.exports = {
collectCoverage: true,
collectCoverageFrom: ['src/**/*.{js,vue}'],
globals: {
NODE_ENV: 'test',
},
moduleDirectories: [
'node_modules',
'src',
],
moduleNameMapper: {
'^vue$': '<rootDir>/node_modules/vue/dist/vue.common.js',
'^@server/(.*)$': '<rootDir>/server/$1',
'^@src/(.*)$': '<rootDir>/src/$1',
'^@components/(.*)$': '<rootDir>/src/components/$1',
'^@js/(.*)$': '<rootDir>/src/js/$1',
'^@store/(.*)$': '<rootDir>/src/store/$1',
'^@dist/(.*)$': '<rootDir>/dist/$1',
},
snapshotSerializers: ['jest-serializer-vue'],
testURL: 'http:https://localhost',
transform: {
'^.+\\.vue$': 'vue-jest',
'^.+\\.js?$': 'babel-jest',
},
transformIgnorePatterns: [
'node_modules/(?!(lodash-es|vue-ssr-build))',
],
verbose: true,
};