Repository navigation
test: add comprehensive test coverage for useToastStore, recipient PII reveal, session, and StepFinalSignature - #2031
Merged
blurbeast merged 1 commit intoOct 18, 2026
Conversation
…I reveal, session, and StepFinalSignature - Add useToastStore.test.ts: tests for duration defaults, toast truncation, and update-recompute logic (LabsCrypt#1900) - Add reveal.route.test.ts: tests for all branches of recipient PII reveal endpoint including auth, roles, validation (LabsCrypt#1901) - Add session.test.ts: tests for JWT expiry checking, session clearing, logout debounce, and error handling (LabsCrypt#1902) - Add StepFinalSignature.test.tsx: tests for interest calculation, sign/submit/poll state machine, and cleanup (LabsCrypt#1903) Closes LabsCrypt#1900 LabsCrypt#1901 LabsCrypt#1902 LabsCrypt#1903
| }); | ||
|
|
||
| it("adds a toast with error duration for error type", () => { | ||
| const id = useToastStore.getState().addToast({ |
| type: "success", | ||
| title: "First", | ||
| }); | ||
| const id2 = useToastStore.getState().addToast({ |
1 task
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
This PR adds comprehensive test coverage for four previously untested modules (#1900–#1903):
Test Files Added
1. useToastStore.test.ts (#1900)
Coverage:
Tests: 17 cases
2. reveal.route.test.ts (#1901)
Coverage:
Tests: 10 cases covering all route branches
3. session.test.ts (#1902)
Coverage:
Tests: 16 cases covering JWT expiry checking, session clearing, and logout debounce
4. StepFinalSignature.test.tsx (#1903)
Coverage:
(principal * 12 * termDays) / (365 * 100)Tests: 15 cases covering all branches and state transitions
Key Testing Patterns
getState(), state reset inbeforeEachTotal Coverage
58 test cases across 4 test files, covering previously untested:
Closes #1900
Closes #1901
Closes #1902
Closes #1903