dojo-test

Automate Dojo model and system tests using Cairo's test framework.

Updated Apr 3, 2026
One-click install
npx skills add https://github.com/cartridge-gg/scoundrel --skill dojo-test-cartridge-gg
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dojo-test
Source: https://github.com/cartridge-gg/scoundrel/tree/main/.agents/skills/dojo-test
Command: npx skills add https://github.com/cartridge-gg/scoundrel --skill dojo-test-cartridge-gg

SYSTEM DOCUMENTATION & REQUIREMENTS

## What problem does it solve? This Skill automates the creation and execution of tests for Dojo models and systems using Cairo's test framework and Dojo utilities, enabling reliable validation of game logic.

## Core Features & Use Cases

  • Generates unit tests in model files with #[cfg(test)] modules
  • Provides integration tests structure under tests/ with spawn_test_world and world assertions
  • Demonstrates cheat codes usage and state verification for robust scenarios

### Quick Start Write a Cairo unit test that initializes a Dojo model and asserts expected state changes.

Frequently Asked Questions about dojo-test

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write Dojo tests for Cairo models and systems?

To write Dojo tests, you generate unit tests in model files with #[cfg(test)] modules and integration tests under tests/ using spawn_test_world to assert expected world state changes and interactions.

What is the difference between unit and integration testing in a Dojo world?

Unit testing validates individual model logic with #[cfg(test)] modules, while integration testing uses spawn_test_world to verify state changes and permissions across interconnected Dojo systems.

Can I use cheat codes to test Dojo game logic interactions?

Yes, Dojo test scaffolds support cheat code usage to manipulate and verify robust game logic scenarios, allowing you to simulate state changes and permissions during integration test execution.

Does this testing framework support validating Dojo model state changes?

Yes, Cairo's test framework combined with Dojo utilities automates the validation of state changes, enabling reliable assertions for both unit and integration testing workflows.

What's the best way to structure Dojo integration tests under the tests directory?

Structure Dojo integration tests under tests/ using spawn_test_world setup and world assertions, embedding test scaffolds and run scripts to verify component interactions and permissions.