With watch: true, the DURABLE shape: one page behind a stable WatchSession.url, kept
open with the rerun verbs and file watching, exactly as watch gives you.
One run, watched as it happens.
-
abort(): Promise<void>
Cuts the run short. The browser drops the rest of its queue and the run ends where it is, with
aborted: trueon the result — which TestSession.result still resolves with, so an aborted run is answered rather than left hanging. -
close(): Promise<void>
Closes the session, ending iteration. Idempotent; implied by
await using. -
droppedEvents: number
How many events the feed dropped because a consumer fell behind.
0in every ordinary run. -
events(): Stream<RunEvent>
The same events as iterating the session, as a Stream — so the combinators are there without a
Stream.fromwrapper. -
result(): Promise<RunResult>
The finished run. Starts it if nothing has yet, and resolves with the same RunResult the final
runEndevent carries — neverundefined, which is the whole reason this is a session rather than a bare event stream.
What openSession accepts: every run option, plus the one that chooses the shape.
Usage
import * as mod from "lib/api/session.ts";