-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Summary
We should add a comprehensive test suite to improve confidence in changes and prevent regressions.
Motivation / Why
- Improve users confidence when choosing this package.
- Allow users to create meaningful and correct change requests.
- Block merges when tests fail.
Scope
Add tests for the SDK’s core behaviors, including:
-
Client initialization
- Requires/accepts API key (or other auth configuration if applicable).
- Validates config options (base URL, timeouts, environment, etc.).
-
Requests
- Correct headers (auth/payload signature)
- Correct JSON body serialization and optional fields handling.
-
Responses
- Successful responses are parsed correctly into expected shapes.
Acceptance criteria
- Test framework configured and runnable via
npm test(or equivalent). - CI job runs tests on PRs and main branch.
- Code coverage reporting (Let's aim for 90%)
- Clear contributor docs: how to run and add tests locally.
Out of scope (for this issue)
- End-to-end tests against the real Antilopay API: Since we do not have access to a sandbox environment.
- Run time type safety tests: To keep the project light weight, I have decided not to use a run-time type validation package such as Zod/ArkType. It is expected that common sense will be employed when writing code using this package.
Notes / Open questions
- Unsure if we should implement integration tests, and mock requests and responses.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request