playwright-api-mock
Version:
An automated API response snapshot tool for Playwright. This plugin records API network requests during test runs and reuses them as mocks for fast, reliable, and deterministic tests.
13 lines (12 loc) • 381 B
TypeScript
import type { Page } from '@playwright/test';
import type { PluginConfig } from './types';
declare class Plugin {
private page;
private store;
private config;
constructor(page: Page, config?: Partial<PluginConfig>);
private log;
record(configOverwrite?: Partial<PluginConfig>): Promise<void>;
}
export declare const ApiMockPlugin: typeof Plugin;
export {};