Testing Framework
This page describes the preferred testing approach for this project.
Preferred framework
Section titled “Preferred framework”- GdUnit is the preferred test framework for testing plugin classes and game logic.
- The Godot development project in this repo contains a GdUnit-based suite with scene runners and input simulations.
Running tests
Section titled “Running tests”- Use the provided scripts and VS Code tasks to run tests. See the workspace tasks for “Run GdUnit Test” or demo test runners.
- Tests are organized by feature (placement, targeting, rules, indicators) and include scene fixtures for fast iteration.
Writing tests
Section titled “Writing tests”- Favor small, focused tests per class or rule; add scene-level tests for integration flows like the placement chain.
- Assert on validation outcomes and signals, not implementation details; use the public API and contract of each class.
See also: