layui/jest.config.js

27 lines
669 B
JavaScript
Raw Normal View History

2021-09-27 06:09:33 +08:00
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',
],
},
],
},
2021-10-19 15:21:58 +08:00
}