13. Testing Alef Programs
Alef supports tests and operational smoke scripts.
Unit Tests
@test
fn adds_numbers() {
assert_eq(2 + 3, 5)
}
Run:
alef test .
Smoke Tests
Public examples should include:
bash scripts/smoke.sh
A good smoke script exercises behavior. For a server program, it should:
- start the server on localhost
- request a real page or endpoint
- trigger a state change
- verify the state changed
- call
/__shutdown
That is how an example proves it is a program, not a screenshot.