You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Tests rely on document title/meta side effects and MSW handlers; ensure cleanup between tests (e.g., resetting document.head and timers) to avoid cross-test leakage and flakiness.
it("should set document title after successful API call",async()=>{renderProviderFn?.(<CurrentLeaderboardMetadata/>);awaitwaitFor(()=>{expect(document.title).toBe('CodeBloom - std::string november = "hello world"',);});});it("should set document description after successful API call",async()=>{renderProviderFn?.(<CurrentLeaderboardMetadata/>);awaitwaitFor(()=>{constmetaDescription=document.querySelector('meta[name="description"]',);expect(metaDescription).toBeInTheDocument();expect(metaDescription).toHaveAttribute("content","CodeBloom - View your rank in the leaderboard",);});});
Two identical GET handlers are registered for the same endpoint in successful handlers; MSW will use the last match—confirm this is intended and doesn’t mask different cases.
The mock server launches when VITE_MOCK is "true"; ensure this never runs in production builds and that CI/staging envs set the variable explicitly to avoid unexpected network interception.
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.
642
Description of changes
Checklist before review
Screenshots
Dev
Staging