Skip to content

[TEST] Add comprehensive test suite#11

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

[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
@IISweetHeartII
Copy link
Copy Markdown
Contributor Author

Holding merge for now because this PR currently has no CI/status checks attached (). Once CI is wired or manual validation results are attached, I can review the test-only diff for merge readiness.

@IISweetHeartII
Copy link
Copy Markdown
Contributor Author

현재 체크 결과가 비어 있어서 자동 리뷰/머지를 보류합니다. CI가 붙으면 대형 PR 기준으로 심층 리뷰 후 이어서 처리하겠습니다.

@IISweetHeartII
Copy link
Copy Markdown
Contributor Author

CI workflow is now on main via #12, but this older PR still has no checks attached. Please rebase or push once to trigger the new pull_request validation workflow, then it can be reviewed/merged.

@IISweetHeartII
Copy link
Copy Markdown
Contributor Author

main에 이미 반영되어 close. 구체 근거: 방금 머지된 #13 (commit 52540d5)가 , , 동일 3파일의 comprehensive test suite를 current main 기준 clean branch로 다시 올린 refresh PR이며, PR 본문에도 #11을 refresh/supersede한다고 명시돼 있습니다. 따라서 #11 내용은 main에 최신 형태로 반영됐습니다.

@IISweetHeartII
Copy link
Copy Markdown
Contributor Author

Close 근거 보강: merged #13 (commit 52540d5) already brought the comprehensive SDK test suite into main via the same 3 files, src/client.test.ts, src/errors.test.ts, and src/http.test.ts, on a clean branch rebased from current main. #13 explicitly states it refreshes and supersedes stalled #11, so #11 is now represented in main by the refreshed PR.

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