0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2024-12-16 20:26:19 -05:00

fix(test): remove jest-matcher-specific-error (#3402)

This commit is contained in:
simeng-li 2023-03-14 17:31:48 +08:00 committed by GitHub
parent e359479ad5
commit 0978db5790
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 56 additions and 20 deletions

View file

@ -12,10 +12,11 @@ import {
} from '#src/__mocks__/index.js';
const { jest } = import.meta;
const { mockEsmWithActual } = createMockUtils(jest);
const { mockEsm } = createMockUtils(jest);
await mockEsmWithActual('i18next', () => ({
mockEsm('i18next', () => ({
default: {
language: 'en',
t: (key: string) => key,
},
}));

View file

@ -4,7 +4,6 @@ const config = {
coveragePathIgnorePatterns: ['/node_modules/', '/src/__mocks__/'],
coverageReporters: ['text-summary', 'lcov'],
coverageProvider: 'v8',
setupFilesAfterEnv: ['jest-matcher-specific-error'],
roots: ['./lib'],
moduleNameMapper: {
'^(chalk|inquirer)$': '<rootDir>/../../shared/lib/esm/module-proxy.js',

View file

@ -51,8 +51,10 @@
"eslint": "^8.34.0",
"i18next": "^21.8.16",
"i18next-browser-languagedetector": "^6.1.4",
"identity-obj-proxy": "^3.0.0",
"jest": "^29.5.0",
"jest-environment-jsdom": "^29.0.0",
"jest-transform-stub": "^2.0.0",
"jest-transformer-svg": "^2.0.0",
"js-base64": "^3.7.2",
"ky": "^0.33.0",
@ -74,6 +76,7 @@
"react-timer-hook": "^3.0.5",
"stylelint": "^15.0.0",
"superstruct": "^0.16.0",
"ts-jest": "^29.0.5",
"typescript": "^4.9.4",
"use-debounced-loader": "^0.1.1",
"zod": "^3.20.2"

View file

@ -906,8 +906,10 @@ importers:
eslint: ^8.34.0
i18next: ^21.8.16
i18next-browser-languagedetector: ^6.1.4
identity-obj-proxy: ^3.0.0
jest: ^29.5.0
jest-environment-jsdom: ^29.0.0
jest-transform-stub: ^2.0.0
jest-transformer-svg: ^2.0.0
js-base64: ^3.7.2
ky: ^0.33.0
@ -929,6 +931,7 @@ importers:
react-timer-hook: ^3.0.5
stylelint: ^15.0.0
superstruct: ^0.16.0
ts-jest: ^29.0.5
typescript: ^4.9.4
use-debounced-loader: ^0.1.1
zod: ^3.20.2
@ -967,8 +970,10 @@ importers:
eslint: 8.34.0
i18next: 21.8.16
i18next-browser-languagedetector: 6.1.4
identity-obj-proxy: 3.0.0
jest: 29.5.0
jest-environment-jsdom: 29.2.2
jest-transform-stub: 2.0.0
jest-transformer-svg: 2.0.0_jest@29.5.0+react@18.2.0
js-base64: 3.7.2
ky: 0.33.0
@ -990,6 +995,7 @@ importers:
react-timer-hook: 3.0.5_biqbaboplfbrettd7655fr4n2y
stylelint: 15.0.0
superstruct: 0.16.0
ts-jest: 29.0.5_cdjgginuefokmzmklysahvrmme
typescript: 4.9.4
use-debounced-loader: 0.1.1_react@18.2.0
zod: 3.20.2
@ -3666,7 +3672,7 @@ packages:
jest: 29.5.0
jest-matcher-specific-error: 1.0.0
jest-transform-stub: 2.0.0
ts-jest: 29.0.3_nckmaurnbfkojttjdlftytir5y
ts-jest: 29.0.5_nckmaurnbfkojttjdlftytir5y
transitivePeerDependencies:
- '@babel/core'
- babel-jest
@ -9249,18 +9255,6 @@ packages:
picomatch: 2.3.1
dev: true
/jest-util/29.3.1:
resolution: {integrity: sha512-7YOVZaiX7RJLv76ZfHt4nbNEzzTRiMW/IiOG7ZOKmTXmoGBxUDefgMAxQubu6WPVqP5zSzAdZG0FfLcC7HOIFQ==}
engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0}
dependencies:
'@jest/types': 29.5.0
'@types/node': 18.11.18
chalk: 4.1.2
ci-info: 3.5.0
graceful-fs: 4.2.10
picomatch: 2.3.1
dev: true
/jest-util/29.4.1:
resolution: {integrity: sha512-bQy9FPGxVutgpN4VRc0hk6w7Hx/m6L53QxpDreTZgJd9gfx/AV2MjyPde9tGyZRINAUrSv57p2inGBu2dRLmkQ==}
engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0}
@ -9508,6 +9502,12 @@ packages:
hasBin: true
dev: true
/json5/2.2.3:
resolution: {integrity: sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==}
engines: {node: '>=6'}
hasBin: true
dev: true
/jsonfile/4.0.0:
resolution: {integrity: sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==}
optionalDependencies:
@ -13940,8 +13940,41 @@ packages:
resolution: {integrity: sha512-AqTiAOLcj85xS7vQ8QkAV41hPDIJ71XJB4RCUrzo/1GM2CQwhkJGaf9Hgr7BOugMRpgGUrqRg/DrBDl4H40+8g==}
dev: true
/ts-jest/29.0.3_nckmaurnbfkojttjdlftytir5y:
resolution: {integrity: sha512-Ibygvmuyq1qp/z3yTh9QTwVVAbFdDy/+4BtIQR2sp6baF2SJU/8CKK/hhnGIDY2L90Az2jIqTwZPnN2p+BweiQ==}
/ts-jest/29.0.5_cdjgginuefokmzmklysahvrmme:
resolution: {integrity: sha512-PL3UciSgIpQ7f6XjVOmbi96vmDHUqAyqDr8YxzopDqX3kfgYtX1cuNeBjP+L9sFXi6nzsGGA6R3fP3DDDJyrxA==}
engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0}
hasBin: true
peerDependencies:
'@babel/core': '>=7.0.0-beta.0 <8'
'@jest/types': ^29.0.0
babel-jest: ^29.0.0
esbuild: '*'
jest: ^29.0.0 || ^29.1.2
typescript: '>=4.3'
peerDependenciesMeta:
'@babel/core':
optional: true
'@jest/types':
optional: true
babel-jest:
optional: true
esbuild:
optional: true
dependencies:
bs-logger: 0.2.6
fast-json-stable-stringify: 2.1.0
jest: 29.5.0
jest-util: 29.5.0
json5: 2.2.3
lodash.memoize: 4.1.2
make-error: 1.3.6
semver: 7.3.8
typescript: 4.9.4
yargs-parser: 21.1.1
dev: true
/ts-jest/29.0.5_nckmaurnbfkojttjdlftytir5y:
resolution: {integrity: sha512-PL3UciSgIpQ7f6XjVOmbi96vmDHUqAyqDr8YxzopDqX3kfgYtX1cuNeBjP+L9sFXi6nzsGGA6R3fP3DDDJyrxA==}
engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0}
hasBin: true
peerDependencies:
@ -13965,8 +13998,8 @@ packages:
bs-logger: 0.2.6
fast-json-stable-stringify: 2.1.0
jest: 29.5.0
jest-util: 29.3.1
json5: 2.2.1
jest-util: 29.5.0
json5: 2.2.3
lodash.memoize: 4.1.2
make-error: 1.3.6
semver: 7.3.8