Skip to content

Add docs for how to write unit tests for shared utility helpers #479

Description

@Chucks1093

Summary

The client has a growing set of shared utility helpers but no documented pattern for how to test them. Contributors adding new helpers often skip tests or write them inconsistently because there is no reference to follow.

Scope

  • Document the test file naming convention for utils: helperName.test.ts co-located with the helper
  • Explain the test runner setup and how to run only util tests
  • Include a worked example test for a simple helper showing describe block, test cases, and assertions
  • Add a note that pure helpers should have 100% branch coverage

Acceptance Criteria

  • Naming convention and co-location pattern are documented
  • Test runner command for utils is included
  • Worked example covers describe block structure and assertions
  • Branch coverage expectation is stated

ETA: 12 hours


Coordinate on Telegram

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave program

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions