element-plus/jest.config.js
三咲智子 3e8409cd45
refactor(dev): drop babel (#3678)
* refactor(dev): drop babel

* test: fix test

* drop babel

* refactor: drop nodejs 14 support
2021-09-27 15:25:58 +08:00

23 lines
738 B
JavaScript

module.exports = {
globals: {
// work around: https://github.com/kulshekhar/ts-jest/issues/748#issuecomment-423528659
'ts-jest': {
diagnostics: {
ignoreCodes: [151001],
},
},
},
testPathIgnorePatterns: ['/node_modules/', 'dist'],
modulePathIgnorePatterns: ['/node_modules/', 'dist'],
testEnvironment: 'jsdom',
transform: {
// Doesn't support jsx/tsx since sucrase doesn't support Vue JSX
'\\.(j|t)s$': '@sucrase/jest-plugin',
'^.+\\.vue$': 'vue-jest',
},
moduleFileExtensions: ['ts', 'tsx', 'js', 'json'],
// u can change this option to a more specific folder for test single component or util when dev
// for example, ['<rootDir>/packages/input']
roots: ['<rootDir>'],
}