Jadpo is experimental and not ready for production. These docs follow the compiler's main branch as of 30 Oct 2026. What's built · Install 0.1.0
jadpo
Reference: Testing

Testing

Writing a test

On this page

A test is a sentence that names it, then a body of ordinary code. In the body, assert fails the test when its condition is false. Here a test checks a function that says whether a todo is overdue:

example
// domains/planning/libraries/due_dates.test.jadpouse planning/types { DueAt }test "a todo due yesterday is overdue" {    var due: DueAt = "2026-01-14T12:00:00Z"    var now: DueAt = "2026-01-15T12:00:00Z"    assert due_dates.is_overdue(due, now)}

due_dates is a library in the planning domain, and is_overdue is one of its functions. DueAt is the domain's type for a due date, an Instant. The test sits beside the library's file, so it calls the library without importing it.

The sentence names the test

A test's sentence is its name, and it is used once in the whole project. A second test with the same sentence is semantic.duplicate_declaration. Jadpo's records know a test by the file it sits beside and its sentence (Stable identity).

Each test starts from nothing

Each test gets its own empty database, its own clock and its own fakes. So tests never depend on each other, and they can run in any order.

Markdown for agents: /docs/writing-a-test.md.Built from Jadpo main at a707efb.