method TestSession.abort
TestSession.abort(): Promise<void>

Cuts the run short. The browser drops the rest of its queue and the run ends where it is, with aborted: true on the result — which TestSession.result still resolves with, so an aborted run is answered rather than left hanging.

Resolves once the run has finished unwinding. Aborting before the run starts makes it a no-op that ends the session immediately.

Return Type

Promise<void>

Usage

import { type TestSession } from "lib/api/session.ts";