From 739189b018ebc20df655b675d52a4e3e4af89f8d Mon Sep 17 00:00:00 2001 From: Callum McIntyre Date: Tue, 4 Jun 2024 15:25:03 +0000 Subject: [PATCH] Add moduleNameMapper to Jest config This fixes the errors caused by .js imports --- core/jest.config.cjs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/jest.config.cjs b/core/jest.config.cjs index 657386fc..3ce2b6e2 100644 --- a/core/jest.config.cjs +++ b/core/jest.config.cjs @@ -2,4 +2,7 @@ module.exports = { preset: 'ts-jest', testEnvironment: 'node', + moduleNameMapper: { + '^(\\./.+|\\../.+).js$': '$1', + }, };