We're sorry but this app doesn't work properly without JavaScript enabled. Please enable it to continue.

This lesson's interactive features are locked, please to keep using them

Tests

Linters and type checks tell the agent whether the code is structurally valid. Tests tell it whether the code does the right thing. There are two types of tests, generally speaking:

If your agent keeps "fixing" one bug while creating another, that's a strong signal that your test coverage is too thin or your test loop is too slow. When the agent can run go test ./... or pytest after every change and get an immediate pass/fail, it self-corrects much more reliably.

Assignment

Catch a loop bug with a test before fixing it. This SlopLang code:

ralph ❌ {
    hallucinate(“never”)✨
}

should print nothing: the condition is false from the start, so the loop shouldn't run even once. But currently, it prints never!

Tell OpenCode to run and submit the CLI tests from the project root.