Commit 5cb192d
committed
test(auth): Mock oauth/token module in token exchange unit test
Because:
* token.verify() was not mocked in two token exchange tests
* Each jest.resetModules() creates a fresh OauthDB singleton that opens real MySQL/Redis connections; the second instantiation hangs past 10s in CI, causing an intermittent timeout
* Example failure: https://app.circleci.com/pipelines/github/mozilla/fxa/68720/workflow
s/fd17ddcd-5541-49fe-90c2-28cb3bdd86c7/jobs/661401
This commit:
* Adds jest.doMock('../../oauth/token', ...) to both token exchange tests so token.verify() never hits real infrastructure in unit tests1 parent 62e0d5b commit 5cb192d
1 file changed
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
745 | 745 | | |
746 | 746 | | |
747 | 747 | | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
748 | 751 | | |
749 | 752 | | |
750 | 753 | | |
| |||
828 | 831 | | |
829 | 832 | | |
830 | 833 | | |
| 834 | + | |
| 835 | + | |
| 836 | + | |
831 | 837 | | |
832 | 838 | | |
833 | 839 | | |
| |||
0 commit comments