Skip to content

docs: add minimum viable test structure guide for new contract functions#337

Merged
Chucks1093 merged 1 commit into
accesslayerorg:mainfrom
wheval:fix/issues-305
May 29, 2026
Merged

docs: add minimum viable test structure guide for new contract functions#337
Chucks1093 merged 1 commit into
accesslayerorg:mainfrom
wheval:fix/issues-305

Conversation

@wheval
Copy link
Copy Markdown
Contributor

@wheval wheval commented May 29, 2026

Summary

Adds contributor documentation that defines the minimum test categories expected for any new contract function and includes example structures for read-only and write entrypoints.

Purpose / Motivation

Contributors adding new contract functions had no single reference for the baseline tests reviewers expect. This doc sets a consistent quality bar by listing required categories — happy path, error cases, and state assertions — and pointing to the shared contract_test_env helpers.

Changes Made

  • Add docs/minimum-viable-test-structure.md with:
    • A table of minimum test categories and when each applies
    • Example test structures for a read-only function (get_key_symbol) and a write function (set_protocol_fee_recipient)
    • A pre-PR checklist and links to related error/read-only docs
  • Link the new guide from CONTRIBUTING.md (integration test helpers section and documentation list)
  • Cross-reference the guide from creator-keys/tests/contract_test_env/mod.rs

Docs-only change; no contract or test code modified.

How to Test

  1. Open docs/minimum-viable-test-structure.md and confirm the three minimum categories (happy path, error cases, state assertions) are clearly listed.
  2. Verify both example sections (read-only and write) include setup, execution, and assertions aligned with existing tests in creator-keys/tests/.
  3. From CONTRIBUTING.md, follow the link to the new doc and confirm it resolves.
  4. Run cargo test --workspace — should pass unchanged (no code changes).

Breaking Changes

None.

Related Issues

Closes #305

Checklist

  • Code builds successfully
  • Tests added/updated (N/A — docs-only)
  • No console errors
  • Documentation updated (if needed)

Made with Cursor

@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented May 29, 2026

@wheval Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@Chucks1093 Chucks1093 merged commit 8c89538 into accesslayerorg:main May 29, 2026
1 check passed
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.

Add docs for minimum viable test structure for new contract functions

2 participants