Description
Write snapshot tests to verify contract state serialization/deserialization works correctly.
Requirements and context
- Must test all data structures serialize correctly
- Should test deserialization produces identical state
- Must catch unintended state structure changes
Suggested execution
- Create branch:
add-snapshot-tests-contract-state-serialization
- Keep changes scoped to the issue and reference the task IDs in the PR
Implement changes
- Create snapshots for ContractConfig structure
- Create snapshots for ContractStats structure
- Create snapshots for GameState structure
- Test serialization of all enum variants
- Test deserialization accuracy
- Verify backward compatibility
- Set up snapshot update workflow
Test and commit
- Generate baseline snapshots
- Run snapshot tests
- Verify any changes are intentional
- Include snapshot files in PR
Example commit message
test: add snapshot tests for contract state serialization
Guidelines
- Prefer small, reviewable PRs
- Keep naming and data contracts consistent with the spec docs
- Preserve responsive and accessible behavior for frontend work
Description
Write snapshot tests to verify contract state serialization/deserialization works correctly.
Requirements and context
Suggested execution
add-snapshot-tests-contract-state-serializationImplement changes
Test and commit
Example commit message
Guidelines