chore: update test config

This commit is contained in:
tangjinzhou 2020-07-25 14:34:22 +08:00
parent ddb1b7eb4d
commit 3880d6027c
4 changed files with 10 additions and 15 deletions

View File

@ -1,18 +1,16 @@
{ {
"env": { "env": {
"test": { "test": {
"presets": [["env", { "targets": { "node": "current" } }]], "presets": [["@babel/preset-env", { "targets": { "node": true } }]],
"plugins": [ "plugins": [
["@ant-design-vue/babel-plugin-jsx", { "usePatchFlag": false }], ["@ant-design-vue/babel-plugin-jsx", { "usePatchFlag": false }],
"babel-plugin-inline-import-data-uri", "@babel/plugin-proposal-optional-chaining",
"@babel/plugin-transform-member-expression-literals",
"@babel/plugin-transform-property-literals",
"@babel/plugin-proposal-export-default-from",
"@babel/plugin-transform-object-assign", "@babel/plugin-transform-object-assign",
"@babel/plugin-transform-template-literals",
"@babel/plugin-proposal-object-rest-spread", "@babel/plugin-proposal-object-rest-spread",
"@babel/plugin-proposal-export-default-from",
"@babel/plugin-proposal-class-properties", "@babel/plugin-proposal-class-properties",
"transform-runtime" "@babel/plugin-syntax-dynamic-import",
"@babel/plugin-transform-runtime"
] ]
} }
} }

View File

@ -12,7 +12,7 @@ module.exports = {
modulePathIgnorePatterns: ['/_site/'], modulePathIgnorePatterns: ['/_site/'],
testPathIgnorePatterns: ['/node_modules/', 'node'], testPathIgnorePatterns: ['/node_modules/', 'node'],
transform: { transform: {
'.*\\.(vue|md)$': '<rootDir>/node_modules/vue-jest', '^.+\\.(vue|md)$': '<rootDir>/node_modules/vue-jest',
'^.+\\.(js|jsx)$': '<rootDir>/node_modules/babel-jest', '^.+\\.(js|jsx)$': '<rootDir>/node_modules/babel-jest',
'^.+\\.svg$': '<rootDir>/node_modules/jest-transform-stub', '^.+\\.svg$': '<rootDir>/node_modules/jest-transform-stub',
}, },

View File

@ -35,7 +35,6 @@ module.exports = function(modules) {
}, },
}, },
], ],
require.resolve('@ant-design-vue/babel-preset-jsx'),
], ],
plugins, plugins,
env: { env: {

View File

@ -60,11 +60,12 @@
"devDependencies": { "devDependencies": {
"@ant-design-vue/babel-plugin-jsx": "^1.0.0-beta.3", "@ant-design-vue/babel-plugin-jsx": "^1.0.0-beta.3",
"@babel/cli": "^7.8.4", "@babel/cli": "^7.8.4",
"@babel/core": "^7.9.6", "@babel/core": "^7.10.5",
"@babel/plugin-proposal-class-properties": "^7.8.3", "@babel/plugin-proposal-class-properties": "^7.8.3",
"@babel/plugin-proposal-export-default-from": "^7.8.3", "@babel/plugin-proposal-export-default-from": "^7.8.3",
"@babel/plugin-proposal-object-rest-spread": "^7.9.6", "@babel/plugin-proposal-object-rest-spread": "^7.9.6",
"@babel/plugin-proposal-optional-chaining": "^7.10.1", "@babel/plugin-proposal-optional-chaining": "^7.10.1",
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
"@babel/plugin-transform-member-expression-literals": "^7.8.3", "@babel/plugin-transform-member-expression-literals": "^7.8.3",
"@babel/plugin-transform-object-assign": "^7.8.3", "@babel/plugin-transform-object-assign": "^7.8.3",
"@babel/plugin-transform-property-literals": "^7.8.3", "@babel/plugin-transform-property-literals": "^7.8.3",
@ -72,7 +73,6 @@
"@babel/plugin-transform-template-literals": "^7.8.3", "@babel/plugin-transform-template-literals": "^7.8.3",
"@babel/polyfill": "^7.8.7", "@babel/polyfill": "^7.8.7",
"@babel/preset-env": "^7.9.6", "@babel/preset-env": "^7.9.6",
"@babel/runtime": "^7.10.1",
"@commitlint/cli": "^8.0.0", "@commitlint/cli": "^8.0.0",
"@commitlint/config-conventional": "^8.0.0", "@commitlint/config-conventional": "^8.0.0",
"@octokit/rest": "^16.0.0", "@octokit/rest": "^16.0.0",
@ -85,13 +85,11 @@
"axios": "^0.19.0", "axios": "^0.19.0",
"babel-core": "^7.0.0-bridge.0", "babel-core": "^7.0.0-bridge.0",
"babel-eslint": "^10.0.1", "babel-eslint": "^10.0.1",
"babel-jest": "^23.6.0", "babel-jest": "^26.1.0",
"babel-loader": "^8.0.0", "babel-loader": "^8.0.0",
"babel-plugin-import": "^1.1.1", "babel-plugin-import": "^1.1.1",
"babel-plugin-inline-import-data-uri": "^1.0.1", "babel-plugin-inline-import-data-uri": "^1.0.1",
"babel-plugin-istanbul": "^6.0.0", "babel-plugin-istanbul": "^6.0.0",
"babel-plugin-syntax-dynamic-import": "^6.18.0",
"babel-preset-env": "^1.6.1",
"case-sensitive-paths-webpack-plugin": "^2.1.2", "case-sensitive-paths-webpack-plugin": "^2.1.2",
"chalk": "^3.0.0", "chalk": "^3.0.0",
"cheerio": "^1.0.0-rc.2", "cheerio": "^1.0.0-rc.2",
@ -177,12 +175,12 @@
"dependencies": { "dependencies": {
"@ant-design-vue/babel-helper-vue-compatible-props": "^1.0.0", "@ant-design-vue/babel-helper-vue-compatible-props": "^1.0.0",
"@ant-design/icons-vue": "^5.0.0-beta.0", "@ant-design/icons-vue": "^5.0.0-beta.0",
"@babel/runtime": "^7.10.5",
"@simonwep/pickr": "~1.7.0", "@simonwep/pickr": "~1.7.0",
"add-dom-event-listener": "^1.0.2", "add-dom-event-listener": "^1.0.2",
"array-tree-filter": "^2.1.0", "array-tree-filter": "^2.1.0",
"async-validator": "^3.0.3", "async-validator": "^3.0.3",
"babel-helper-vue-jsx-merge-props": "^2.0.3", "babel-helper-vue-jsx-merge-props": "^2.0.3",
"babel-runtime": "6.x",
"classnames": "^2.2.5", "classnames": "^2.2.5",
"component-classes": "^1.2.6", "component-classes": "^1.2.6",
"dom-align": "^1.10.4", "dom-align": "^1.10.4",