Skip to content

test(api): add unit tests for sessionExpiredError module (closes #1194) - #1205

Open
rupesh-kumar-sah wants to merge 1 commit into
rinafcode:mainfrom
rupesh-kumar-sah:test/issue-1194-session-expired-error
Open

rupesh-kumar-sah wants to merge 1 commit into
rinafcode:mainfrom
rupesh-kumar-sah:test/issue-1194-session-expired-error

Conversation

@rupesh-kumar-sah

Copy link
Copy Markdown

Overview

Closes #1194.

Adds comprehensive unit tests for in .

Coverage Details

  • ****: Confirms exported constant value matches expected .
  • ****:
    • Validates full payload extraction (, , ) from with nested response data.
    • Tests fallback to when is missing.
    • Tests fallback to and default message when no error details are provided.
    • Tests handling of standard instances returning sanitized .
    • Tests edge cases: non-error objects, strings, numbers, , and .
  • ****: Verifies returned sanitized error contract.

Verification

  • Tested locally with Jest: all 7 unit tests pass cleanly.
  • ESLint and Prettier verified with 0 errors and 0 warnings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add unit tests for src/services/api/sessionExpiredError.ts

1 participant