element-plus/jest.config.js
三咲智子 aaf90d99d0
test: switch to vitest (#5991)
* test: use vitest

* test: add script and ci

* chore: improve tsconfig

* refactor: use-form-item

* fix: remove unused

* chore: improve scripts

* test: improve mock

* refactor: change coverage
2022-02-21 14:28:22 +08:00

23 lines
736 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>/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>'],
}