interface Connections

Live handles for the three resources allocated at the start of a test run. Passed through the run pipeline and closed together on shutdown.

// Defined, not invoked: the run pipeline allocates all three together at run start.
async function teardown({ page, browser, server }: Connections) {
  await page.close();
  await browser.close();
  await server.close();
}

Properties

The HTTP + WebSocket server that serves the test bundle and streams TAP events.

browser: Browser

The Playwright browser instance.

page: Page

The Playwright page (tab) navigated to the test URL.

Usage

import { type Connections } from "lib/types.ts";