Skip to content

Add docs for testing conventions covering unit test structure, mocking patterns, and integration test setup #648

Description

@Chucks1093

Summary

Contributors writing new tests have no documented conventions for how tests should be structured, how to mock the wallet or API, or how to set up the integration test environment. A testing conventions document would reduce friction and keep the test suite consistent.

Scope

  • Document the unit test file naming and co-location convention
  • Describe the standard pattern for mocking React Query responses in unit tests
  • Explain how to mock wallet connection state in component tests
  • Document how to set up the integration test environment including any required providers or fixtures
  • List the test utilities available (e.g. custom render functions, query client factories)

Acceptance Criteria

  • Unit test naming and co-location convention documented
  • React Query mock pattern documented with a code example
  • Wallet mock pattern documented with a code example
  • Integration test setup steps documented
  • Available test utilities listed with descriptions
  • Document lives in docs/ and cross-links the error handling conventions doc

ETA: 12 hours


Coordinate on Telegram

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave program

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions