From bd47dceb73620b204156f536d890ec0c56c274b4 Mon Sep 17 00:00:00 2001 From: Hassan Abouelela Date: Sat, 18 Jun 2022 03:24:40 +0400 Subject: Remove Jest SVG Transformer The current SVG transformer has not had an update in 4 years, and breaks with the latest jest version. The behavior can be very easily replicated by hand, as is documented by SVGR, the library we are already using in webpack. Signed-off-by: Hassan Abouelela --- jest.config.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'jest.config.js') diff --git a/jest.config.js b/jest.config.js index a126998..127d90b 100644 --- a/jest.config.js +++ b/jest.config.js @@ -1,7 +1,9 @@ module.exports = { transform: { '^.+\\.(t|j)sx?$': ['@swc/jest'], - '^.+\\.svg$': ['jest-svg-transformer'] + }, + moduleNameMapper: { + '\\.svg$': '/src/tests/__mocks__/svg.ts', }, collectCoverageFrom: [ "src/**/*.{js,jsx,ts,tsx}", -- cgit v1.2.3