Skip to content

Ignore AGENT_TEST_MODE in jest - #6258

Merged
j0ntz merged 1 commit into
developfrom
jon/jest-ignore-agent-test-mode
Oct 14, 2026
Merged

j0ntz merged 1 commit into
developfrom
jon/jest-ignore-agent-test-mode

Conversation

@j0ntz

@j0ntz j0ntz commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Description

Asana task

Jest reads the developer's local config.json. With AGENT_TEST_MODE on there, SceneWrapper drops the NotificationView, and five scene snapshots fail in four suites: TransactionDetailsScene, SwapConfirmationScene, SwapSuccessScene and SwapCreateScene. They fail on an untouched develop too.

jestSetup.js mocks src/util/agentTestMode, so isAgentTestMode() returns false in every test. RecoveryReminderActions.test.ts mocks the module itself. A mock in a test file replaces the one from the setup file, and its flag-on cases still run.

No app code and no snapshot changes.

I ran npm test -- --ci three ways.

  • With the develop setup file and the flag on, the four suites above fail on 5 snapshots.
  • On this branch with the flag on, the full suite passes: 128 suites, 1122 tests, 108 snapshots.
  • On this branch with the flag off, the full suite passes with the same counts.

CHANGELOG

Does this branch warrant an entry to the CHANGELOG?

  • Yes
  • No

Dependencies

none

Requirements

If you have made any visual changes to the GUI. Make sure you have:

  • Tested on iOS device
  • Tested on Android device
  • Tested on small-screen device (iPod Touch)
  • Tested on large-screen device (tablet)

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-13T23:59:15.354020Z 215f31d PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Jest reads the developer's local config.json, so a machine with
AGENT_TEST_MODE on dropped the NotificationView from SceneWrapper and
failed five scene snapshots. Mock src/util/agentTestMode in
jestSetup.js so the flag reads as off in every test. A test that needs
it on still mocks the module itself.
@j0ntz
j0ntz force-pushed the jon/jest-ignore-agent-test-mode branch from 215f31d to 2e466ae Compare October 14, 2026 00:03
@j0ntz
j0ntz enabled auto-merge October 14, 2026 00:06
@j0ntz

j0ntz commented Oct 14, 2026

Copy link
Copy Markdown
Contributor Author

Landing this without a review.

  • Rationale: a jest-only change: one module mock in the jest setup file and a changelog line, with no app code
  • Authority: Force Land = Land Approved on the linked Asana task (1219494537043691)
  • Bypassed: the approving-review requirement only. Every required check is green on 2e466ae40b556f34b2efd43f903944a7a2464a59.

@j0ntz
j0ntz merged commit b9bc94e into develop Oct 14, 2026
7 checks passed
@j0ntz
j0ntz deleted the jon/jest-ignore-agent-test-mode branch October 14, 2026 00:28
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.

1 participant