feat(auth-server): Add Jest integration test infrastructure and migrate account_create tests #20004
+1,876
−28
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Because
setup/teardown, dynamic port allocation)
describe.eachfor protocol version matrix testing, and a foundation for migrating remaining integration testsThis pull request
mail_helperlifecycle managementjest.integration.config.jswith 120s timeout, integration-specific test matchers, and setup filesaccount_create_tests.js(62 tests) from Mocha to Jest, testing both V1 and V2 protocol versions viadescribe.eachsmoke.spec.tsto validate the test infrastructure itselftest-integration-jestNx target and CircleCI job for PR and tag workflows.mocharc.jsto ignore*.spec.tsfiles so Mocha doesn't pick up Jest testsstripeHelperoptional indeleteAccountIfUnverifiedto support running without Stripe credentials in test environmentslog.jserror methodIssue
Closes: https://mozilla-hub.atlassian.net/browse/FXA-12609
Checklist
Other Information
How to test:
cd packages/fxa-auth-server npx jest --config jest.integration.config.jsRequires local MySQL and infrastructure services running (yarn start infrastructure).
New dependencies: portfinder, esbuild-jest
Architecture decision: The auth server is spawned as a child process rather than imported directly due to ESM module compatibility issues with Jest's transform pipeline.