tcmts.cli.testing

TestOutcome type
evaluateCached (cb: Codebase, watches: WatchRecord[], src: DefSource, fresh: boolean) => Map<number, WatchResult &…
Watch expression values, reused by hash. Like a test's, a watch expression's hash covers everything it evaluates, so a value is only stale if it depends on the outside world: one whose code reaches it (the clock, randomness, the network, files, the environment, other processes) is evaluated every time, and so is one that threw (as a test's failure, it can be the runner's). `fresh` re-runs them all.
isTestPath (p: string) => boolean
Tests are definitions named `test…` (`lib.testSortIsStable`, `test_sort`) or living under a `tests` namespace.
printOutcomes (outcomes: TestOutcome[], indent?: string) => void
A line per test, and why each failure failed: its message, and what it printed. Brief (`TCM_BRIEF=1`, as the MCP server's tools run commands), a failure is the start of its message and where it failed (the first place in the codebase's own definitions, which `tcm at` names), with the rest in a file the report names.
runCached (cb: Codebase, items: { path: string; rec: DefRecord; }[], src: DefSource, fresh: boolean) => TestO…
Run tests, reusing cached results. A test's hash covers its code and, through its dependencies, everything it calls (pinned npm versions included), so a cached result is only stale if the test depends on something outside the codebase, like the filesystem, the clock, or the network. `fresh` ignores the cache. A test whose code reaches files, the environment or other processes is kept for the platform too (`keysForResults`).
summary (outcomes: TestOutcome[]) => string