Testing
Put a test block in a .ko file. Tests use ordinary assertions and can call
your functions directly.
def double(value: int) -> int:
return value * 2
test "double works":
assert double(21) == 42Run the file:
kora test examples/07_tests.koModel calls can replay committed cassettes, so tests stay deterministic and free:
kora run --replay examples/01_expense_check.koUse mock when a test needs a typed replacement for a model or tool. Keep
fixtures small and test both Ok and expected outcome branches.
Last updated on