Skip to content

[No QA] Isolate Jest TypeScript project - #100124

Merged
roryabraham merged 4 commits into
mainfrom
rory/tsconfig-cleanup-jest
Sep 3, 2026
Merged

[No QA] Isolate Jest TypeScript project#100124
roryabraham merged 4 commits into
mainfrom
rory/tsconfig-cleanup-jest

Conversation

@roryabraham

@roryabraham roryabraham commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Explanation of Change

Create a dedicated tsconfig.jest.json, move the Jest type reference and matcher augmentation into tests/globals.d.ts, and point TypeScript/ESLint test paths at the new project. The root app project no longer loads Jest types or Jest test roots; its unrelated include paths remain unchanged.

This intentionally lands the project boundary before phase 2. Adding moduleSuffixes: [".web", ""] still exposes the same source resolution errors addressed by #99495, so that option remains deferred rather than adding temporary ESLint restrictions or source backstops here.

Fixed Issues

For #99289
PROPOSAL: N/A

Tests

  1. Run npm run typecheck.
  2. Verify tsconfig.json, tsconfig.jest.json, tsconfig.bun.json, tsconfig.node.json, and the Victory Chart Renderer project all pass.
  3. Run npm run lint-changed.
  4. Run npm run spell-changed.
  5. Run npm test -- --runInBand --silent tests/unit/parseAndCollectJSONsTest.ts tests/unit/retryWithBackoffTests.ts.
  6. Verify both Node-environment Jest suites pass.
  • Verify that no errors appear in the JS console (not applicable: tooling-only change)

Offline tests

Not applicable: tooling-only change.

QA Steps

Same as tests.

  • Verify that no errors appear in the JS console (not applicable: tooling-only change)

PR Author Checklist

  • I linked the correct issue in the ### Fixed Issues section above
  • I wrote clear testing steps that cover the changes made in this PR
    • I added steps for local testing in the Tests section
    • I added steps for the expected offline behavior in the Offline steps section
    • I added steps for Staging and/or Production testing in the QA steps section
    • I added steps to cover failure scenarios (not applicable: configuration-only change)
    • I turned off my network connection and tested it while offline (not applicable: configuration-only change)
    • I tested this PR with a High Traffic account (not applicable: configuration-only change)
  • I included screenshots or videos for tests on all platforms (not applicable: configuration-only change)
  • I ran the tests on all platforms & verified they passed on (not applicable: configuration-only change):
    • Android: Native
    • Android: mWeb Chrome
    • iOS: Native
    • iOS: mWeb Safari
    • MacOS: Chrome / Safari
  • I verified there are no console errors (not applicable: configuration-only change)
  • I followed proper code patterns
    • I verified that comments were added to code that is not self explanatory
    • I verified that any new or modified comments were clear, correct English, and explained why
    • I verified any copy/text added to the app is grammatically correct (not applicable)
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I followed the Review Guidelines
  • I tested other components that can be impacted by my changes (not applicable)
  • If a new CSS style is added I verified it (not applicable)
    • A similar style doesn't already exist
    • The style can't be created with an existing StyleUtils function
  • If new assets were added or existing ones were modified (not applicable)
    • The assets are optimized and compressed
    • The assets load correctly across all supported platforms
  • If the PR modifies code that runs when editing or sending messages, I tested markdown behavior (not applicable)
  • If the PR modifies a generic component, I tested impacted usages (not applicable)
  • If the PR modifies a component related to Storybook stories, I verified stories (not applicable)
  • If the PR modifies a page accessible by deeplink, I verified deeplinks (not applicable)
  • If the PR modifies UI or form input styles, I verified alignment and design review (not applicable)
  • I added unit tests for any new feature or bug fix (not applicable: configuration-only change)
  • If main was merged after review, I tested again (not applicable)

Screenshots/Videos

Android: Native

Not applicable: tooling-only change.

Android: mWeb Chrome

Not applicable: tooling-only change.

iOS: Native

Not applicable: tooling-only change.

iOS: mWeb Safari

Not applicable: tooling-only change.

MacOS: Chrome / Safari

Not applicable: tooling-only change.

@roryabraham

Copy link
Copy Markdown
Contributor Author

The Jest failure is unrelated to this PR and reproduces locally on unchanged main because today is the 2nd of the month.

Failing test: NextStepUtilsTest › buildNextStep › scheduled submit enabled › monthly on the 2nd

Expected 2026-10-02, received 2026-09-02. DateUtils.getNextNthOfMonth(2) advances to next month when today is the 2nd, while buildOptimisticNextStep() treats today as the valid ETA.

CI: https://github.com/Expensify/App/actions/runs/33595331926/job/100137520826

@roryabraham

Copy link
Copy Markdown
Contributor Author

Tracked the unrelated date-boundary failure in https://github.com/Expensify/Expensify/issues/677843. Knip is fixed and passing on the latest run.

@roryabraham
roryabraham requested a review from blimpich September 2, 2026 23:32
@roryabraham
roryabraham marked this pull request as ready for review September 2, 2026 23:32
@roryabraham
roryabraham requested review from a team as code owners September 2, 2026 23:32
@melvin-bot
melvin-bot Bot requested review from flaviadefaria and removed request for a team September 2, 2026 23:32
@roryabraham
roryabraham removed request for a team and flaviadefaria September 2, 2026 23:32
@melvin-bot
melvin-bot Bot requested a review from youssef-lr September 2, 2026 23:33
@melvin-bot

melvin-bot Bot commented Sep 2, 2026

Copy link
Copy Markdown

@youssef-lr Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button]

@roryabraham
roryabraham merged commit 8ba6160 into main Sep 3, 2026
46 of 47 checks passed
@roryabraham
roryabraham deleted the rory/tsconfig-cleanup-jest branch September 3, 2026 00:18
@OSBotify

OSBotify commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

🚧 roryabraham has triggered a test Expensify/App build. You can view the workflow run here.

@bernhardoj

Copy link
Copy Markdown
Contributor

@roryabraham the PR causes the test files to show red squiggly lines.

image

@OSBotify

OSBotify commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

🚀 Deployed to staging by https://github.com/roryabraham in version: 9.4.70-0 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 iOS 🍎 success ✅

@roryabraham

Copy link
Copy Markdown
Contributor Author

Oh, sorry about that @bernhardoj. In #99291 I was planning to reconfigure these separate TS projects back into a single project using Project References, with a root config owning all the subprojects. I think that will probably integrate better with IDEs.

@OSBotify

OSBotify commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

🚀 Deployed to staging by https://github.com/roryabraham in version: 9.4.72-0 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 iOS 🍎 success ✅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants