element-plus/jest.config.js
三咲智子 bb939c6a58
refactor(build): move to internal package (#6585)
* refactor(build): move to internal package

* ci: fix

* chore: fix

* fix: docs

* chore: add fast-glob to root package

* chore: fix PR comments

* build: add tsx

* refactor: re-organize

* refactor: improve log
2022-03-15 19:23:38 +08:00

23 lines
745 B
JavaScript

/**
* @type import('@jest/types').Config.InitialOptions
*/
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'],
testEnvironment: 'jsdom',
transform: {
'\\.[jt]sx?$': 'babel-jest',
'^.+\\.vue$': '<rootDir>/internal/build/vue-jest-transformer.js',
},
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>'],
}