Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Testing

Testing

Testing is two-layered:

  • Unit tests (kanbanr-core): the dispatch router, transition validation, code generation, milestone DAG cycle detection, all-tasks-done auto-complete (across todo-lists), status-folder file moves, milestone-required.
  • Layer 1 — functional integration (api/crates/kanbanr-cli/tests/): the real coverage, no Docker. local_mode.rs drives the real kanbanr CLI writing an ephemeral data dir under the build output (CARGO_TARGET_TMPDIR) — create/move/todo/task, auto-complete, init, identity, and that the data dir is a git repo committed under the configured identity. view_daemon.rs then runs kanbanr serve over that folder and asserts the read API + the activity endpoint serve it with no auth.
  • Layer 2 — packaging smoke (api/crates/kanbanr-cli/tests/integration.rs): uses testcontainers to confirm the real Docker image boots, scaffolds a project, and serves the read-only view (no auth). It does not re-test business logic (that’s layer 1). #[ignore]d (needs Docker + image); run with make itest.