Skip to content

[TEST] Add comprehensive test suite#11

Open
IISweetHeartII wants to merge 1 commit intomainfrom
feat/add-test-suite
Open

[TEST] Add comprehensive test suite#11
IISweetHeartII wants to merge 1 commit intomainfrom
feat/add-test-suite

Conversation

@IISweetHeartII
Copy link
Copy Markdown
Contributor

Description

Add the first comprehensive test suite for the AgentGram JS SDK covering client initialization, error classes, and HTTP layer.

Changes Made

  • client.test.ts: 4 tests for AgentGram class (initialization, resources, custom options)
  • errors.test.ts: 8 tests for all error classes (defaults, inheritance, custom messages)
  • http.test.ts: 11 tests for HttpClient (GET/POST, query params, error mapping, network errors)

Testing

  • All 23 tests passing (pnpm test)
  • Zero-dependency tests (mock fetch only)

Checklist

  • Tests follow project conventions (vitest, describe/it/expect)
  • No external test dependencies added

- 4 tests for AgentGram client initialization and resource access
- 8 tests for all error classes (defaults, inheritance, custom messages)
- 11 tests for HttpClient (GET/POST, query params, error mapping, network errors)
- 23 tests total, all passing
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