Commit eda8982
committed
refactor(auth): migrate fxa-auth-server tests from sinon/proxyquire to jest
Because:
- sinon/proxyquire is legacy and Jest is the preferred test framework
- Jest mocking (jest.mock/jest.fn) provides better TypeScript integration
This commit:
- Replaces sinon stubs/spies with jest.fn/jest.spyOn across 110+ spec files
- Replaces proxyquire with jest.mock for module mocking
- Removes jest.setup-proxyquire.js in favor of jest.setup-resolve.js
- Removes sinon, proxyquire, and @types/sinon from devDependencies1 parent ed4693b commit eda8982
120 files changed
Lines changed: 13721 additions & 12617 deletions
File tree
- packages/fxa-auth-server
- lib
- email
- utils
- inactive-accounts
- metrics
- oauth
- payments
- iap
- apple-app-store
- google-play
- paypal
- profile
- pushbox
- routes
- auth-schemes
- oauth
- subscriptions
- utils
- cms
- senders
- tokens
- scripts
- cancel-subscriptions-to-plan
- check-firestore-stripe-sync
- cleanup-old-carts
- convert-customers-to-stripe-automatic-tax
- delete-inactive-accounts
- move-customers-to-new-plan-v2
- move-customers-to-new-plan
- recorded-future
- stripe-products-and-plans-to-firestore-documents
- update-subscriptions-to-new-plan
- test
- lib
- remote
- payments/configuration
- scripts
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
| 32 | + | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| |||
Lines changed: 4 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | | - | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
13 | | - | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| |||
0 commit comments