Support importing font files in tests

Follow up for #7019

Signed-off-by: Oliver Sand <oliver.sand@sda-se.com>
This commit is contained in:
Oliver Sand
2021-09-06 13:00:47 +02:00
parent 8d73d23d34
commit 13895db371
2 changed files with 8 additions and 3 deletions
+6
View File
@@ -0,0 +1,6 @@
---
'@backstage/cli': patch
---
Support importing font files in tests.
This fixes remaining issues from [#7019](https://github.com/backstage/backstage/pull/7019).
+2 -3
View File
@@ -80,9 +80,8 @@ async function getConfig() {
transform: {
'\\.esm\\.js$': require.resolve('./jestEsmTransform.js'), // See jestEsmTransform.js
'\\.(js|jsx|ts|tsx)$': require.resolve('@sucrase/jest-plugin'),
'\\.(bmp|gif|jpg|jpeg|png|frag|xml|svg)$': require.resolve(
'./jestFileTransform.js',
),
'\\.(bmp|gif|jpg|jpeg|png|frag|xml|svg|eot|woff|woff2|ttf)$':
require.resolve('./jestFileTransform.js'),
'\\.(yaml)$': require.resolve('yaml-jest'),
},