element-plus/jest.config.js

23 lines
745 B
JavaScript
Raw Normal View History

/**
* @type import('@jest/types').Config.InitialOptions
*/
2020-07-24 16:44:56 +08:00
module.exports = {
setupFiles: ['./jest.setup.js'],
testMatch: [
'**/__tests__/**/*.[jt]s?(x)',
'**/?(*.)+(spec|test).[jt]s?(x)',
'!**/**vitest**',
],
testPathIgnorePatterns: ['/node_modules/', 'dist'],
modulePathIgnorePatterns: ['/node_modules/', 'dist', 'cypress'],
2020-07-24 16:44:56 +08:00
testEnvironment: 'jsdom',
transform: {
'\\.[jt]sx?$': 'babel-jest',
'^.+\\.vue$': '<rootDir>/internal/build/vue-jest-transformer.js',
2020-07-24 16:44:56 +08:00
},
moduleFileExtensions: ['ts', 'tsx', 'js', 'json', 'vue'],
// u can change this option to a more specific folder for test single component or util when dev
// for example, ['<rootDir>/packages/components/input']
roots: ['<rootDir>'],
2020-07-24 16:44:56 +08:00
}