Skip to content

Title: Add snapshot tests for contract state serialization #379

@popsman01

Description

@popsman01

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

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