Skip to content

Contract testing guide #578

Description

@codebestia

Write contracts/docs/testing.md: how the Soroban test environment is used across the three contracts — Env::default(), address generation, mock_all_auths versus asserting real auth, advancing ledger time for expiry paths, and cross-contract test setup where proposals calls into group_treasury.

Acceptance criteria:

  • Documents the standard test scaffolding with a copyable example
  • Explains testing authorization properly, and the risk that blanket auth mocking hides a missing require_auth
  • Documents how to test time-dependent behaviour such as proposal expiry
  • Documents the test_snapshots/ directory: what generates it, that it is committed, and that it is Prettier-ignored as generated output

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions