Fix tests failing on image import

This commit is contained in:
Nikita Nek Dudnik
2020-05-08 16:34:07 +02:00
parent f3c42578c4
commit 520503b85c
3 changed files with 3 additions and 1 deletions
+1
View File
@@ -30,6 +30,7 @@
"devDependencies": {
"@spotify/eslint-config-oss": "^1.0.1",
"husky": "^4.2.3",
"identity-obj-proxy": "^3.0.0",
"lerna": "^3.20.2",
"lint-staged": "^10.1.0",
"prettier": "^2.0.5"
+1
View File
@@ -28,6 +28,7 @@ if (fs.existsSync('jest.config.js')) {
modulePaths: ['<rootDir>'],
moduleNameMapper: {
'\\.(css|less|scss|sss|styl)$': require.resolve('jest-css-modules'),
'.+\\.(png|jpg|ttf|woff|woff2)$': 'identity-obj-proxy',
},
// We build .esm.js files with plugin:build, so to be able to load these in tests they need to be transformed
// TODO: jest is working on module support, it's possible that we can remove this in the future
+1 -1
View File
@@ -11169,7 +11169,7 @@ icss-utils@^4.0.0, icss-utils@^4.1.1:
dependencies:
postcss "^7.0.14"
identity-obj-proxy@3.0.0:
identity-obj-proxy@3.0.0, identity-obj-proxy@^3.0.0:
version "3.0.0"
resolved "https://registry.npmjs.org/identity-obj-proxy/-/identity-obj-proxy-3.0.0.tgz#94d2bda96084453ef36fbc5aaec37e0f79f1fc14"
integrity sha1-lNK9qWCERT7zb7xarsN+D3nx/BQ=