Loading...
Loading...
Write and run unit tests for WoW addons using Busted and the Mechanic test framework. Covers test structure, mocking WoW APIs, and coverage analysis. Use when adding tests, fixing bugs with regression tests, or improving coverage. Triggers: test, unit test, coverage, Busted, mock, TDD, sandbox.
npx skill4agent add falkicon/mechanic s-testMANDATORY: Always use CLI commands before manual exploration.
| Task | Command |
|---|---|
| Generate Stubs | |
| Run Sandbox Tests | |
| Run Busted Tests | |
| Test Coverage | |
| Sandbox Status | |
| Request type | Load reference |
|---|---|
| Sandbox, Busted, In-Game guides | ../../docs/integration/testing.md |
| Busted spec patterns | references/busted-patterns.md |
| Mocking WoW APIs | references/wow-mocking.md |
| MechanicLib test registration | ../../docs/integration/mechaniclib.md |
describe("MyAddon Core", function()
it("calculates values correctly", function()
local result = Core.Calculate(10, 20)
assert.equals(30, result)
end)
end)# Generate stubs once
mech call sandbox.generate
# Run tests frequently
mech call sandbox.test -i '{"addon": "MyAddon"}'