mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
chore: update jest config (#4994)
This commit is contained in:
parent
9d21b53731
commit
4cd132c0ee
@ -27,7 +27,7 @@ module.exports = function (api) {
|
||||
{
|
||||
corejs: false,
|
||||
helpers: true,
|
||||
regenerator: false,
|
||||
regenerator: NODE_ENV === 'test',
|
||||
useESModules
|
||||
}
|
||||
],
|
||||
|
@ -1,17 +1,12 @@
|
||||
module.exports = {
|
||||
preset: 'ts-jest',
|
||||
setupFiles: ['<rootDir>/test/jest.init.js'],
|
||||
moduleFileExtensions: ['js', 'vue', 'ts', 'tsx'],
|
||||
moduleFileExtensions: ['js', 'jsx', 'vue', 'ts', 'tsx'],
|
||||
transform: {
|
||||
'^.+\\.(js|ts|tsx)$': '<rootDir>/test/jest.transform.js',
|
||||
'.*\\.(vue)$': '<rootDir>/node_modules/vue-jest'
|
||||
},
|
||||
moduleNameMapper: {
|
||||
'^src/(.*)$': '<rootDir>/src/$1'
|
||||
'\\.(vue)$': 'vue-jest',
|
||||
'\\.(js|jsx|ts|tsx)$': '<rootDir>/test/jest.transform.js',
|
||||
},
|
||||
snapshotSerializers: ['<rootDir>/node_modules/jest-serializer-vue'],
|
||||
collectCoverageFrom: [
|
||||
'src/**/*.{js,ts,tsx,vue}',
|
||||
'src/**/*.{js,jsx,ts,tsx,vue}',
|
||||
'!**/style/**',
|
||||
'!**/demo/**',
|
||||
'!**/locale/lang/**',
|
||||
|
@ -67,7 +67,6 @@
|
||||
"@babel/plugin-syntax-jsx": "^7.2.0",
|
||||
"@babel/plugin-transform-object-assign": "^7.2.0",
|
||||
"@babel/plugin-transform-runtime": "^7.6.2",
|
||||
"@babel/polyfill": "^7.7.0",
|
||||
"@babel/preset-env": "^7.7.1",
|
||||
"@babel/preset-typescript": "^7.7.2",
|
||||
"@types/jest": "^24.0.22",
|
||||
@ -101,7 +100,6 @@
|
||||
"postcss-loader": "^3.0.0",
|
||||
"style-loader": "^1.0.0",
|
||||
"stylelint": "^11.1.1",
|
||||
"ts-jest": "^24.1.0",
|
||||
"typescript": "^3.7.2",
|
||||
"uppercamelcase": "^3.0.0",
|
||||
"vue": "^2.6.10",
|
||||
|
@ -1 +0,0 @@
|
||||
require('@babel/polyfill');
|
34
yarn.lock
34
yarn.lock
@ -819,14 +819,6 @@
|
||||
"@babel/helper-create-regexp-features-plugin" "^7.7.0"
|
||||
"@babel/helper-plugin-utils" "^7.0.0"
|
||||
|
||||
"@babel/polyfill@^7.7.0":
|
||||
version "7.7.0"
|
||||
resolved "https://registry.yarnpkg.com/@babel/polyfill/-/polyfill-7.7.0.tgz#e1066e251e17606ec7908b05617f9b7f8180d8f3"
|
||||
integrity sha512-/TS23MVvo34dFmf8mwCisCbWGrfhbiWZSwBo6HkADTBhUa2Q/jWltyY/tpofz/b6/RIhqaqQcquptCirqIhOaQ==
|
||||
dependencies:
|
||||
core-js "^2.6.5"
|
||||
regenerator-runtime "^0.13.2"
|
||||
|
||||
"@babel/preset-env@^7.7.1":
|
||||
version "7.7.1"
|
||||
resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.7.1.tgz#04a2ff53552c5885cf1083e291c8dd5490f744bb"
|
||||
@ -3017,11 +3009,6 @@ core-js-pure@3.1.2:
|
||||
resolved "https://registry.yarnpkg.com/core-js-pure/-/core-js-pure-3.1.2.tgz#62fc435f35b7374b9b782013cdcb2f97e9f6dffa"
|
||||
integrity sha512-5ckIdBF26B3ldK9PM177y2ZcATP2oweam9RskHSoqfZCrJ2As6wVg8zJ1zTriFsZf6clj/N1ThDFRGaomMsh9w==
|
||||
|
||||
core-js@^2.6.5:
|
||||
version "2.6.5"
|
||||
resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.5.tgz#44bc8d249e7fb2ff5d00e0341a7ffb94fbf67895"
|
||||
integrity sha512-klh/kDpwX8hryYL14M9w/xei6vrv6sE8gTHDG7/T/+SEovB/G4ejwcfE/CBzO6Edsu+OETZMZ3wcX/EjUkrl5A==
|
||||
|
||||
core-util-is@1.0.2, core-util-is@~1.0.0:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7"
|
||||
@ -6497,11 +6484,6 @@ lodash.kebabcase@^4.1.1:
|
||||
resolved "https://registry.yarnpkg.com/lodash.kebabcase/-/lodash.kebabcase-4.1.1.tgz#8489b1cb0d29ff88195cceca448ff6d6cc295c36"
|
||||
integrity sha1-hImxyw0p/4gZXM7KRI/21swpXDY=
|
||||
|
||||
lodash.memoize@4.x:
|
||||
version "4.1.2"
|
||||
resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-4.1.2.tgz#bcc6c49a42a2840ed997f323eada5ecd182e0bfe"
|
||||
integrity sha1-vMbEmkKihA7Zl/Mj6tpezRguC/4=
|
||||
|
||||
lodash.sortby@^4.7.0:
|
||||
version "4.7.0"
|
||||
resolved "https://registry.yarnpkg.com/lodash.sortby/-/lodash.sortby-4.7.0.tgz#edd14c824e2cc9c1e0b0a1b42bb5210516a42438"
|
||||
@ -9969,22 +9951,6 @@ ts-jest@^23.10.5:
|
||||
semver "^5.5"
|
||||
yargs-parser "10.x"
|
||||
|
||||
ts-jest@^24.1.0:
|
||||
version "24.1.0"
|
||||
resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-24.1.0.tgz#2eaa813271a2987b7e6c3fefbda196301c131734"
|
||||
integrity sha512-HEGfrIEAZKfu1pkaxB9au17b1d9b56YZSqz5eCVE8mX68+5reOvlM93xGOzzCREIov9mdH7JBG+s0UyNAqr0tQ==
|
||||
dependencies:
|
||||
bs-logger "0.x"
|
||||
buffer-from "1.x"
|
||||
fast-json-stable-stringify "2.x"
|
||||
json5 "2.x"
|
||||
lodash.memoize "4.x"
|
||||
make-error "1.x"
|
||||
mkdirp "0.x"
|
||||
resolve "1.x"
|
||||
semver "^5.5"
|
||||
yargs-parser "10.x"
|
||||
|
||||
tslib@^1.8.1:
|
||||
version "1.9.3"
|
||||
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.9.3.tgz#d7e4dd79245d85428c4d7e4822a79917954ca286"
|
||||
|
Loading…
x
Reference in New Issue
Block a user