Skip to content

QA: added unit test for api.ts#5

Open
Nubcoder0118 wants to merge 1 commit intomainfrom
qa/api-tests
Open

QA: added unit test for api.ts#5
Nubcoder0118 wants to merge 1 commit intomainfrom
qa/api-tests

Conversation

@Nubcoder0118
Copy link
Copy Markdown

No description provided.

@Nubcoder0118
Copy link
Copy Markdown
Author

  1. Install dependencies (from /frontend):
  • npm install
    1. Install test dependencies (if not already installed):
  • npm install --save-dev jest ts-jest @types/jest
    1. Run tests:
  • npm test

  • What these tests cover:

    • Correct API endpoint paths
    • Request methods (GET/POST)
    • Request body formatting
    • Authorization header injection
    • Error handling for failed requests

  • Notes:

    • Uses mocked fetch and Supabase session
    • Safe to run without backend or Supabase
    • Designed for QA validation before integration
      */

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.

1 participant