method TestSession.events
TestSession.events(): Stream<RunEvent>

The same events as iterating the session, as a Stream — so the combinators are there without a Stream.from wrapper.

The session stays a HANDLE rather than becoming a Stream: every combinator returns a new Stream, so session.filter(…) would hand back an object with no close() and a live browser with no owner.

// Defined, not invoked: a real session launches a browser.
async function firstTen(session: TestSession) {
  return await session.events().filter((e) => e.kind === 'test').take(10).collect();
}

Return Type

Usage

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