ToolsCommandsThe jadpo command
jadpo test
On this page
Run tests.
Run the project's tests in the interpreter, in an order a seed decides, and report each failure with the values in its assertion, what happened instead and the command that reruns it. Without a path, the project is found by walking up to app.jadpo and every test runs; a file runs its tests, a folder the tests under it, and
jadpo test [path]Arguments
path(optional): A test file,: , or a folder
Flags
--name <text>: Run tests whose names contain this text--kind <kind>: Run one kind, such as pure or recording--failed: Rerun the tests that failed last time--seed <n>: Run in the order this seed gives--watch: Rerun the tests each save reaches--keep-failed: Keep a failed test's database to inspect
On every command
--json: Print data for tools instead of text--full: Show everything a report shortens--help: Show every flag, with examples--color <when>: Choose when to use colour
jadpo test --json writes one JSON document to standard output instead of text, with the same exit code. The document has schemaVersion, command ("test"), ok, data (what the command produced, null when it failed) and diagnostics (each error with its rule, reason, next and help). A command that needs a terminal refuses --json and names the flags that do the same job.
Examples
# Run every test in the project you are injadpo test# Run the test at line 12 of a file, in the order seed 48213 givesjadpo test domains/planning/libraries/dates.test.jadpo:12 --seed 48213# Rerun the tests that failed last timejadpo test --failed# Rerun the tests each save reaches, until ctrl-cjadpo test --watch# Print the results as data for toolsjadpo test --json
Errors
cli.test_arguments: Ajadpo testcommand names a path that isn't there, or a seed, a kind or a--nameit can't usetest.assertion_failed: A test'sassertdoesn't hold: its condition is false, or a call checked withassert … failsreturned or failed differentlytest.unexpected_failure: Test ended in a failure it did not expecttest.fault: Test stopped on a faulttest.subscriber_failed: Subscriber failed for good during a testtest.failed: A test failed underjadpo test, or among a package's own tests underjadpo package checktest.no_tests: Ajadpo testcommand found no test to run: the project has none, or none matches the path, line, name, kind or--failedit givestest.runtime_start_failed: The tests couldn't start, because the machine couldn't givejadpo testthe thread with a large stack they run on, usually for lack of memorytest.database_unavailable: The tests that need a database couldn't run, because PostgreSQL for the tests couldn't be started or reachedmigration.apply_failed: Applying the project's migrations to a database stopped at a step that failedmigration.extension_missing: The project's migrations need a PostgreSQL extension, such as pgvector, that the database server doesn't offer or that the role applying them can't createmigration.extension_outdated: The database server's PostgreSQL extension, such as pgvector, is older than the project's migrations and queries needtoolchain.not_built_yet: Operation is declared but not built yettoolchain.project_not_found: You ran a command that works on a project in a folder with noapp.jadpo, in it or in any folder above it
Markdown for agents: /docs/jadpo-test.md.Built from Jadpo main at aee2e8f.