Commit 20f589c
authored
fix(test): mock WallOfLove and DiscordButton in page tests (JhaSourav07#2233)
## Description
Fixes JhaSourav07#2231
Resolves JSDOM timeouts in `app/page.test.tsx` by mocking/stubbing
`WallOfLove` and `DiscordButton` within the LandingPage tests. This
isolates the component under test from infinite GSAP loop cycles and
ScrollTrigger event listeners that freeze JSDOM.
## Pillar
- [x] 🛠️ Other (Bug fix, refactoring, docs)
## Checklist before requesting a review:
- [x] I have read the `CONTRIBUTING.md` file.
- [x] I have tested these changes locally
(`localhost:3000/api/streak?user=...`).
- [x] I have run `npm run format` and `npm run lint` locally and
resolved all errors.
- [x] I have run `npm run test` and all tests pass locally.
- [x] I have run `npm run test:coverage` and branch coverage is at or
above 70%.
- [x] My commits follow the Conventional Commits format.
- [x] I have made sure that I have only one commit to merge in this PR.1 file changed
Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
17 | 25 | | |
18 | 26 | | |
19 | 27 | | |
| |||
0 commit comments