What problem does it solve?
Provides a fast, repeatable way to generate comprehensive unit and integration tests for Dojo-based Cairo projects so developers can validate game logic, model state transitions, and permissioned system behavior without manual test scaffolding.
Core Features & Use Cases
- Spawn test world setup: Automatically includes spawn_test_world() scaffolding and namespace/contract definitions for integration scenarios.
- Model and system assertions: Produces #[cfg(test)] modules with assertions using world.read_model, world.write_model_test, and world.erase_model to verify state changes.
- Cheat-code driven scenarios: Integrates testing cheat codes (set_caller_address, set_block_timestamp, set_contract_address) to simulate different execution contexts and multi-player tests.
- Test organization: Advises where to place unit tests in model files and integration tests in a tests/ directory and includes patterns for expected panics and multiple-player flows.
- Use case: Create integration tests that spawn a player, perform moves via an actions system, and assert both Position and Moves model updates.
Quick Start
Generate an integration test that verifies the move system updates Position and decrements Moves for a spawned player.