Write tests for Dojo models and systems using spawn_test_world, cheat codes, and assertions. Use when testing game logic, verifying state changes, or ensuring system correctness.
83
Does it follow best practices?
If you maintain this skill, you can automatically optimize it using the tessl CLI to improve its score:
npx tessl skill review --optimize ./path/to/skillEvaluation — 99%
↑ 2.02xAgent success when using this skill
Validation for skill structure
Integration test world setup
spawn_test_world usage
0%
100%
sync_perms_and_inits call
0%
100%
namespace_def function
0%
100%
contract_defs function
0%
100%
ContractDefTrait writer permissions
0%
100%
Model registration
25%
100%
Event registration
25%
100%
world.dns usage
0%
100%
world.read_model usage
0%
100%
Correct imports
12%
100%
Integration test location
100%
100%
sozo test command
71%
100%
Without context: $0.3283 · 1m 23s · 18 turns · 25 in / 5,207 out tokens
With context: $0.4599 · 1m 18s · 24 turns · 275 in / 4,746 out tokens
Cheat codes and direct model manipulation
set_contract_address for players
0%
100%
Two distinct player addresses
100%
100%
Independent state verification
100%
100%
set_block_timestamp usage
100%
100%
write_model_test usage
100%
100%
erase_model usage
33%
100%
Post-erase assertion
100%
100%
spawn_test_world setup
37%
100%
world.read_model assertions
100%
100%
Correct imports for cheat codes
60%
100%
Without context: $0.2872 · 1m 9s · 16 turns · 23 in / 3,866 out tokens
With context: $0.3848 · 1m 10s · 21 turns · 59 in / 4,023 out tokens
Test file organization and panic testing
Unit tests in model file
100%
100%
cfg(test) module
100%
100%
At least two unit tests
100%
100%
Integration test in tests/ dir
100%
100%
should_panic attribute
64%
100%
Correct panic message
70%
100%
spawn_test_world in integration test
50%
100%
ModelStorage imports
0%
75%
dojo_cairo_test imports
0%
100%
write_model_test for setup
0%
100%
Without context: $0.2870 · 1m 17s · 16 turns · 62 in / 4,823 out tokens
With context: $0.4241 · 1m 18s · 20 turns · 428 in / 5,156 out tokens
Table of Contents
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.