Daemon control: start, stop, status, and a test that reuses the daemon's warm browser
and returns the same RunResult a local run does.
import * as Daemon from './daemon.ts'; // Defined, not invoked: spawns and talks to a real background process. async function warmRun() { await Daemon.start(); return await Daemon.test({ inputs: ['test/'] }); }
Ensures a daemon is running for this project, spawning one if there isn't.
Probes this project's daemon. An actual round-trip over the socket, not a look at the sentinel
file, so a crashed daemon that left its files behind reports { running: false }.
Stops this project's daemon. Resolves true if one was running, false if there was nothing
to stop — either way, no daemon is running afterwards.
Runs the suite inside this project's daemon and resolves with the same RunResult a local run would produce — reusing the daemon's browser and warm bundle instead of paying for a fresh one.
The options a daemon run accepts: everything from UserRunOptions that survives a socket.
-
reporter: ReporterName | false
One built-in reporter by name, or
false. An instance cannot cross a socket. -
reporters: ReadonlyArray<ReporterName>
Several built-in reporters by name. Mutually exclusive with
reporter, as it is locally.
Every way a daemon-routed run can fail to produce an exit code.