---
title: "Testing, diagnostics, and delivery"
description: "Use the correct --app, EXACT_APP_DIR, and host build for your application; without either, the driver uses Caltrain."
modificationDate: "2026-11-30"
---

> ## Documentation index
> Fetch the complete documentation index at: https://exact.expo.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Testing, diagnostics, and delivery

<AgentInstructions>

## Submitting feedback

From the app's directory, read `bun exact.mjs feedback status`. Under `never`, keep no note.
Respect `EXACT_FEEDBACK=0` and do not change the policy.

Otherwise record specific, actionable feedback with:
`bun exact.mjs feedback note "Exact docs: https://exact.expo.dev/learn/contract-for-humans/testing-diagnostics-and-delivery: <what was wrong or missing>"`

The note goes to Expo only as that status allows. Include no secrets or personal data.

</AgentInstructions>

Put authored interaction tests in `app.test.contract`, beside the app:

```contract-test
test "the counter increments"
  expect text "count" == "Count: 0"
  tap "increment"
  expect text "count" == "Count: 1"
  expect state count == 1
  tap "reset"
  expect state count == 0
```

These steps exercise the first example. Parse a test file with `contract test`;
run it against a built app with the driver:

```sh
cargo run -q -p contract -- test path/to/app.test.contract
bun scripts/agent.mjs web --test path/to/app.test.contract
```

Use the correct `--app`, `EXACT_APP_DIR`, and host build for your application;
without either, the driver uses Caltrain. The driver refuses stale artifacts and
prints the needed rebuild. `clock settle` advances animation deterministically
(it reports `settled: false` while a repeating timer or an infinite animation
runs, as in the Clock and Motion examples); `clock +1000` advances by a second.
Do not replace virtual time with sleeps.

For diagnosis, use `build --json`, `symbols --name <name>`, and
`build -o /tmp/app.plan --map`, which writes `/tmp/app.plan.map.json`. The
development source map connects node layout
to declarations, component calls, and style origins, and says each source's
SHA-256 as compiled (`sources`), so a reader can tell a file moved since. Then drive the actual app:

```sh
bun scripts/agent.mjs web tree state logs "screenshot /tmp/app.png"
```

Compilation, baking, and interaction are different checks. If a view is blank,
inspect `tree`, `layout`, resource state, and logs before changing random styles.
If a resource fails, check the source implementation, its generated types and
grants, and its bake behavior. If an event fails, check the captured arguments,
payload type, current action binding, and whether the node exists.

`app.json` also controls delivery policy. From the app, `bun exact.mjs deploy` is a
dry run, which expects a committed tree (or `--dirty`); publication uses `--yes`,
an origin, a signing key, and the configured signed streams. Before
changing trust or publishing, read [the reference](https://exact.expo.dev/reference/developer.md) on
`EXACT_UPDATE_TRUST` (LLP 1030.000). Writing Contract does not require inventing a deployment
service. `bun exact.mjs push` publishes a working-tree edit to installed release binaries
immediately; `--watch` repeats it on save. It needs a production build receipt or
existing stream and the signing key. It has no dry run and publishes no web root.
To put an iOS app on someone's iPhone, run `bun exact.mjs share`: it
builds the app and prints an AppDrop link that installs it with their own Apple ID.
