-
Notifications
You must be signed in to change notification settings - Fork 18
/
jest.config.js
30 lines (28 loc) · 1002 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
/** ---------------------------------------------------------------------------------------------
* @Author [ETongfu].
* @Des [Jest config].
*-------------------------------------------------------------------------------------------- */
const path = require('path');
module.exports = {
// rootDir: path.resolve(__dirname, './'), // 同 webpack.context
moduleFileExtensions: [ // 同 webpack.resolve.extensions
'js',
'json',
'vue',
],
// moduleNameMapper: {
// '^@/(.*)$': '<rootDir>/src/$1', // 同 webpack.resolve.alias
// },
transform: { // 同 webpack.module.rules
'^.+\\.js$': 'babel-jest',
'.*\\.(vue)$': 'vue-jest',
},
// setupFiles: ['<rootDir>/tests/unit/setup'], // 同 webpack.entry
// coverageDirectory: '<rootDir>/tests/unit/coverage', // 同 webpack.output
// collectCoverageFrom: [ // 同 webpack 的 rule.include
// 'src/**/*.{js,vue}',
// '!src/main.js',
// '!src/router/index.js',
// '!**/node_modules/**',
// ],
};