[PR #203] [MERGED] Replace babel-jest with ts-jest #3051

Closed
opened 2026-02-28 20:35:35 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/actualbudget/actual/pull/203
Author: @TomAFrench
Created: 8/23/2022
Status: Merged
Merged: 8/24/2022
Merged by: @TomAFrench

Base: masterHead: ts-jest


📝 Commits (9)

  • 9be15ea build: replace babel-jest with ts-jest
  • 102d920 chore: allow mobile package to pass with no tests
  • b73ef91 fix: stop typechecking javascript files
  • 2cedd68 fix: add esModuleInterop so that the default imports issue goes away
  • 3118cf2 fix: add ts-jest presets which are equivalent to the old transform properties
  • 0e0b46e fix: stop the web tests from running in node environment
  • c772737 fix: stop trying to transform node_modules
  • 203ab79 fix: correct some re-exports which were breaking things
  • d614577 chore: update remaining test scripts

📊 Changes

18 files changed (+1093 additions, -1196 deletions)

View changed files

jest-babel-transformer-esm.js (+0 -24)
jest-babel-transformer.js (+0 -9)
jest.config.js (+0 -8)
📝 package.json (+2 -4)
📝 packages/loot-core/jest.config.js (+4 -6)
📝 packages/loot-core/jest.web.config.js (+2 -4)
📝 packages/loot-core/package.json (+10 -3)
📝 packages/loot-core/src/server/sync/index.js (+4 -4)
packages/loot-design/.babelrc (+0 -3)
packages/loot-design/babel.config.json (+3 -0)
📝 packages/loot-design/jest.config.js (+1 -4)
📝 packages/loot-design/jest.rn.config.js (+1 -3)
📝 packages/loot-design/package.json (+7 -1)
packages/mobile/jest.config.js (+3 -0)
📝 packages/mobile/package.json (+2 -4)
📝 packages/mobile/test/jest.config.js (+1 -4)
📝 tsconfig.json (+2 -1)
📝 yarn.lock (+1051 -1114)

📄 Description

This PR replaces our usage of babel-jest with ts-jest.

As part of this we've started taking advantage of some yarn v3 magic. Rather than running jest from the monorepo root and making it find all of the tests across all the packages, each package is responsible for running its own test suite. By running yarn workspaces foreach --parallel --verbose run test in the monorepo root we can then run all the tests across the different packages in parallel while keeping encapsulation within each package.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/actualbudget/actual/pull/203 **Author:** [@TomAFrench](https://github.com/TomAFrench) **Created:** 8/23/2022 **Status:** ✅ Merged **Merged:** 8/24/2022 **Merged by:** [@TomAFrench](https://github.com/TomAFrench) **Base:** `master` ← **Head:** `ts-jest` --- ### 📝 Commits (9) - [`9be15ea`](https://github.com/actualbudget/actual/commit/9be15eaee195d40cc4eb2f4d40f9735cad091ce0) build: replace babel-jest with ts-jest - [`102d920`](https://github.com/actualbudget/actual/commit/102d92048bd776c11137cd012cc70eb2d8fc3bf7) chore: allow mobile package to pass with no tests - [`b73ef91`](https://github.com/actualbudget/actual/commit/b73ef9153f2c3f167d8a877138c54588cc1d6850) fix: stop typechecking javascript files - [`2cedd68`](https://github.com/actualbudget/actual/commit/2cedd68e6949b9be72e55065e9a1cc6525478b34) fix: add esModuleInterop so that the default imports issue goes away - [`3118cf2`](https://github.com/actualbudget/actual/commit/3118cf26e35b1009503d9e9c58cd76e97e670512) fix: add ts-jest presets which are equivalent to the old `transform` properties - [`0e0b46e`](https://github.com/actualbudget/actual/commit/0e0b46ed5ede5639db257fde1af6e4abcb0200ad) fix: stop the web tests from running in node environment - [`c772737`](https://github.com/actualbudget/actual/commit/c77273742bef202b9cf3a95823924989eeb9fe36) fix: stop trying to transform node_modules - [`203ab79`](https://github.com/actualbudget/actual/commit/203ab791f20d5e1b8ae422dc5939759f407e8674) fix: correct some re-exports which were breaking things - [`d614577`](https://github.com/actualbudget/actual/commit/d61457716e7aef4c8ae569d1c01149cddd8723fb) chore: update remaining test scripts ### 📊 Changes **18 files changed** (+1093 additions, -1196 deletions) <details> <summary>View changed files</summary> ➖ `jest-babel-transformer-esm.js` (+0 -24) ➖ `jest-babel-transformer.js` (+0 -9) ➖ `jest.config.js` (+0 -8) 📝 `package.json` (+2 -4) 📝 `packages/loot-core/jest.config.js` (+4 -6) 📝 `packages/loot-core/jest.web.config.js` (+2 -4) 📝 `packages/loot-core/package.json` (+10 -3) 📝 `packages/loot-core/src/server/sync/index.js` (+4 -4) ➖ `packages/loot-design/.babelrc` (+0 -3) ➕ `packages/loot-design/babel.config.json` (+3 -0) 📝 `packages/loot-design/jest.config.js` (+1 -4) 📝 `packages/loot-design/jest.rn.config.js` (+1 -3) 📝 `packages/loot-design/package.json` (+7 -1) ➕ `packages/mobile/jest.config.js` (+3 -0) 📝 `packages/mobile/package.json` (+2 -4) 📝 `packages/mobile/test/jest.config.js` (+1 -4) 📝 `tsconfig.json` (+2 -1) 📝 `yarn.lock` (+1051 -1114) </details> ### 📄 Description This PR replaces our usage of `babel-jest` with `ts-jest`. As part of this we've started taking advantage of some yarn v3 magic. Rather than running jest from the monorepo root and making it find all of the tests across all the packages, each package is responsible for running its own test suite. By running `yarn workspaces foreach --parallel --verbose run test` in the monorepo root we can then run all the tests across the different packages in parallel while keeping encapsulation within each package. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-02-28 20:35:35 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/actual#3051