[其他] 初始化项目结构
This commit is contained in:
27
jest.config.js
Normal file
27
jest.config.js
Normal file
@@ -0,0 +1,27 @@
|
||||
module.exports = {
|
||||
roots: ['<rootDir>/test'],
|
||||
preset: 'ts-jest',
|
||||
testEnvironment: 'jsdom',
|
||||
moduleFileExtensions: ['ts', 'vue', 'js', 'jsx', 'tsx', 'json', 'node'],
|
||||
transformIgnorePatterns: ['node_modules/(?!(@vue/shared|element-plus)/)'],
|
||||
moduleNameMapper: { '\\.css$': '<rootDir>/test/__mocks__/css.ts' },
|
||||
transform: {
|
||||
'^.+\\.vue$': 'vue-jest',
|
||||
'^.+\\.(t|j)sx?$': [
|
||||
'babel-jest',
|
||||
{
|
||||
presets: [
|
||||
[
|
||||
'@babel/preset-env',
|
||||
{
|
||||
targets: {
|
||||
node: 'current',
|
||||
},
|
||||
},
|
||||
],
|
||||
'@babel/preset-typescript',
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
}
|
||||
Reference in New Issue
Block a user