1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Mock <Trans /> from @lingui/macro as a component simplely returns children components

Signed-off-by: Hung-Han (Henry) Chen <chenhungh@gmail.com>
Signed-off-by: Hung-Han (Henry) Chen <1474479+chenhunghan@users.noreply.github.com>
This commit is contained in:
Hung-Han (Henry) Chen 2020-10-30 14:46:15 +08:00 committed by Hung-Han (Henry) Chen
parent 7a2da15828
commit 2b2499107f
No known key found for this signature in database
GPG Key ID: 32931168425E1C95
2 changed files with 5 additions and 1 deletions

View File

@ -0,0 +1,3 @@
module.exports = {
Trans: ({ children }: { children: React.ReactNode }) => children,
};

View File

@ -71,7 +71,8 @@
"^.+\\.tsx?$": "ts-jest"
},
"moduleNameMapper": {
"\\.(css|scss)$": "<rootDir>/__mocks__/styleMock.ts"
"\\.(css|scss)$": "<rootDir>/__mocks__/styleMock.ts",
"^@lingui/macro$": "<rootDir>/__mocks__/@linguiMacro.ts"
},
"modulePathIgnorePatterns": [
"<rootDir>/dist"