Jest: fix SVG import breaking tests
This commit is contained in:
parent
a720f3ea32
commit
35d18fbe33
3 changed files with 13 additions and 0 deletions
|
@ -31,4 +31,11 @@ module.exports = {
|
|||
'<rootDir>/app',
|
||||
],
|
||||
'testEnvironment': 'jsdom',
|
||||
'moduleNameMapper': {
|
||||
'^.+.(css|styl|less|sass|scss|png|jpg|svg|ttf|woff|woff2)$': 'jest-transform-stub',
|
||||
},
|
||||
'transform': {
|
||||
'\\.[jt]sx?$': 'babel-jest',
|
||||
'.+\\.(css|styl|less|sass|scss|png|jpg|svg|ttf|woff|woff2)$': 'jest-transform-stub',
|
||||
},
|
||||
};
|
||||
|
|
|
@ -92,6 +92,7 @@
|
|||
"intl-messageformat-parser": "^6.0.0",
|
||||
"intl-pluralrules": "^1.3.0",
|
||||
"is-nan": "^1.2.1",
|
||||
"jest-transform-stub": "^2.0.0",
|
||||
"jsdoc": "~3.6.7",
|
||||
"lodash": "^4.7.11",
|
||||
"mark-loader": "^0.1.6",
|
||||
|
|
|
@ -7239,6 +7239,11 @@ jest-snapshot@^27.1.0:
|
|||
pretty-format "^27.1.0"
|
||||
semver "^7.3.2"
|
||||
|
||||
jest-transform-stub@^2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/jest-transform-stub/-/jest-transform-stub-2.0.0.tgz#19018b0851f7568972147a5d60074b55f0225a7d"
|
||||
integrity sha512-lspHaCRx/mBbnm3h4uMMS3R5aZzMwyNpNIJLXj4cEsV0mIUtS4IjYJLSoyjRCtnxb6RIGJ4NL2quZzfIeNhbkg==
|
||||
|
||||
jest-util@^27.0.0:
|
||||
version "27.0.6"
|
||||
resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-27.0.6.tgz#e8e04eec159de2f4d5f57f795df9cdc091e50297"
|
||||
|
|
Loading…
Reference in a new issue