element-plus/jest.config.js
余林夕 c2951875b3
feat(message-box): migrate MessageBox (#300)
* feat(message-box): migrate MessageBox

* refactor(message-box): import sleep from test-utils

* refactor(message-box): optimize props

* refactor(message-box): optimize message-box

* refactor(message-box): optimize message-box

* refactor(message-box): optimize message-box

* refactor(message-box): remove `removeClass` & `addClass`

* refactor(message-box): replace 'HTMLElement' with 'HTMLButtonElement'

* refactor(message-box): review optimize

* refactor(message-box): __test__ optimize

* refactor(message-box): replace addEvent with on and off

* refactor(message-box): remove doc

* feat(message-box): jest add @babel/plugin-proposal-class-properties

Co-authored-by: YuLinXi <yumengyuan@klicen.com>
2020-10-19 13:50:22 +08:00

35 lines
768 B
JavaScript

module.exports = {
globals: {
// work around: https://github.com/kulshekhar/ts-jest/issues/748#issuecomment-423528659
'ts-jest': {
diagnostics: {
ignoreCodes: [151001],
},
},
},
testEnvironment: 'jsdom',
transform: {
'^.+\\.vue$': 'vue-jest',
'^.+\\.(t|j)sx?$': [
'babel-jest', {
presets: [
[
'@babel/preset-env',
{
targets: {
node: true,
},
},
],
'@babel/preset-typescript',
],
plugins: [
'@vue/babel-plugin-jsx',
'@babel/plugin-proposal-class-properties',
],
},
],
},
moduleFileExtensions: ['vue', 'json', 'ts', 'tsx', 'js', 'json'],
}