From 3118cf26e35b1009503d9e9c58cd76e97e670512 Mon Sep 17 00:00:00 2001 From: Tom French Date: Wed, 24 Aug 2022 21:13:04 +0100 Subject: [PATCH] fix: add ts-jest presets which are equivalent to the old `transform` properties --- packages/loot-core/jest.config.js | 1 + packages/loot-core/jest.web.config.js | 1 + 2 files changed, 2 insertions(+) diff --git a/packages/loot-core/jest.config.js b/packages/loot-core/jest.config.js index 26ee765..30b560f 100644 --- a/packages/loot-core/jest.config.js +++ b/packages/loot-core/jest.config.js @@ -1,6 +1,7 @@ const isReactNative = process.env.REACT_APP_IS_REACT_NATIVE; module.exports = { + preset: 'ts-jest/presets/js-with-ts-esm', moduleFileExtensions: ['testing.js', 'electron.js'] .concat(isReactNative ? ['ios.js', 'mobile.js'] : []) .concat(['mjs', 'js', 'ts', 'json']), diff --git a/packages/loot-core/jest.web.config.js b/packages/loot-core/jest.web.config.js index 9454d4c..84b38b6 100644 --- a/packages/loot-core/jest.web.config.js +++ b/packages/loot-core/jest.web.config.js @@ -1,4 +1,5 @@ module.exports = { + preset: 'ts-jest/presets/js-with-ts-esm', moduleFileExtensions: ['testing.js', 'web.js', 'mjs', 'js', 'ts', 'json'], testEnvironment: 'jsdom', testPathIgnorePatterns: ['/node_modules/', '/lib/'].filter(Boolean),