Skip to content

Conversation

@vbudhram
Copy link
Contributor

@vbudhram vbudhram commented Feb 4, 2026

Because

This pull request

Issue that this pull request solves

Closes: (issue number)

Checklist

Put an x in the boxes that apply

  • My commit is GPG signed.
  • If applicable, I have modified or added tests which pass locally.
  • I have added necessary documentation (if appropriate).
  • I have verified that my changes render correctly in RTL (if appropriate).

Screenshots (Optional)

Please attach the screenshots of the changes made in case of change in user interface.

Other information (Optional)

Any other information that is important to this pull request.

- Add jest.setup.js to set FXA_OPENID_UNSAFELY_ALLOW_MISSING_ACTIVE_KEY
- Remove inline env var setting from ip-profiling.spec.ts
- Configure jest.config.js to use setupFiles

This centralizes the test environment configuration and matches the
approach used in the auth-local-test-migration branch.
Refactor ip-profiling.spec.ts to use shared mocks from test/mocks.js
where possible, reducing code duplication and improving maintainability.

- Replace inline mockDB, mockMailer, mockPush, mockGlean, etc. with
  shared versions from test/mocks.js
- Use getRoute helper from test/routes_helpers.js
- Keep mockRequest inline due to proxyquire path resolution issues
  when running tests from lib/routes/
- Reduce file from ~487 lines to ~305 lines (~37% reduction)
Update Jest test result filenames to follow the same naming convention
as Mocha test results for consistency in CI artifacts.

- jest-unit-results.xml -> fxa-auth-server-jest-unit-results.xml
- jest-integration-results.xml -> fxa-auth-server-jest-integration-results.xml
- jest-results.xml -> fxa-auth-server-jest-results.xml
…leCI job

- Add test-server.ts helper that spawns auth server as child process
  (avoids Jest ESM module compatibility issues)
- Add jest.integration.config.js for remote/integration tests
- Add smoke.spec.ts as initial integration test
- Add test-integration-jest Nx target and npm script
- Add "Integration Test Jest - Servers - Auth" CircleCI job to:
  - test_pull_request workflow
  - test_and_deploy_tag workflow
  - nightly workflow
- Add supporting helpers: mailbox.ts, profile-helper.ts
- Add documentation in jest-integration-test-learnings.md
@vbudhram
Copy link
Contributor Author

vbudhram commented Feb 4, 2026

Closing in favor of #19996

@vbudhram vbudhram closed this Feb 4, 2026
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