Repository navigation
Issue 11 - PR 3 - Challenge.js tweaks - #264
Open
DeMentidDev wants to merge 4 commits into
Open
DeMentidDev wants to merge 4 commits into
DeMentidDev wants to merge 4 commits into
Conversation
…cycle operations into src/utils/challengeStore.js. Route-level permission checks remain in place, and challengeRouter.reset() now delegates to the store. - Added lifecycle coverage for creation, incoming challenges, shared gameId after acceptance, decline, duplicate acceptance (409), self-challenge (400), and TTL expiry.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Extracted the in-memory challenge Map, 2-minute TTL sweep, and lifecycle operations into src/utils/challengeStore.js. Route-level permission checks remain in place, and challengeRouter.reset() now delegates to the store.
Added lifecycle coverage for creation, incoming challenges, shared gameId after acceptance, decline, duplicate acceptance (409), self-challenge (400), and TTL expiry.
Before: npm test -- --runInBand — 22 suites passed, 269 tests passed.
After: npm test -- --runInBand — 22 suites passed, 269 tests passed.
Type of Change
Key Changes
[Describe the main areas of code affected and what was done, e.g., "Auth: Split signup into Parent/Mentor flows" or "Dashboard: Added parent dashboard and child progress view"]
Testing
Bugs Fixed (if applicable)
TODO (Follow-up Work)
Additional Notes
[Any extra context, dependencies, or deployment considerations]