import type { Test } from '@japa/runner/core'; import type { Browser as PlayWrightBrowser } from 'playwright'; import type { PluginConfig } from '../../types/main.js'; /** * Test setup hook that creates a fresh browser context for each test. * This ensures test isolation by providing a clean browser state. * * The hook adds `browser`, `browserContext`, `visit`, and `record` methods * to the test context. * * @param browser - The Playwright browser instance * @param config - Plugin configuration * @param test - The test instance * * @example * ```ts * // Used internally by the plugin * test.setup((self) => createContextHook(browser, config, self)) * ``` */ export declare function createContextHook(browser: PlayWrightBrowser, config: PluginConfig, test: Test): Promise<() => Promise>; /** * Test setup hook that creates fake browser and context objects for tests * in suites that are not configured to interact with browsers. * * These proxies throw helpful error messages if accessed, guiding developers * to configure the plugin for the suite. * * @param test - The test instance * * @example * ```ts * // Used internally by the plugin for non-browser suites * test.setup((self) => createFakeContextHook(self)) * ``` */ export declare function createFakeContextHook(test: Test): void;