Skip to content

A local-first personal finance app

fix: add ts-jest presets which are equivalent to the old `transform` properties

Tom French3118cf26e35b
diff --git a/packages/loot-core/jest.config.js b/packages/loot-core/jest.config.js
index 26ee7650b6..30b560f28b 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 9454d4c41a..84b38b628b 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),