docs: add minimum viable test structure guide for new contract functions#337
Merged
Merged
Conversation
Closes accesslayerorg#305 Co-authored-by: Cursor <cursoragent@cursor.com>
|
@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! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_envhelpers.Changes Made
docs/minimum-viable-test-structure.mdwith:get_key_symbol) and a write function (set_protocol_fee_recipient)CONTRIBUTING.md(integration test helpers section and documentation list)creator-keys/tests/contract_test_env/mod.rsDocs-only change; no contract or test code modified.
How to Test
docs/minimum-viable-test-structure.mdand confirm the three minimum categories (happy path, error cases, state assertions) are clearly listed.creator-keys/tests/.CONTRIBUTING.md, follow the link to the new doc and confirm it resolves.cargo test --workspace— should pass unchanged (no code changes).Breaking Changes
None.
Related Issues
Closes #305
Checklist
Made with Cursor