@harmock/playwright
v1.0.0
Published
Capture, mock, and replay HTTP requests to create fast, reliable, and deterministic frontend tests with minimal setup and intuitive APIs.
Maintainers
Readme
@harmock/playwright
@harmock/playwright is a lightweight helper library that makes integrating HARMock seamless in your Playwright tests. Effortlessly capture, mock, and replay HTTP requests to create fast, reliable, and deterministic playwright tests with minimal setup and intuitive APIs.
Installation
Note that Playwright is a peer dependency of this package
npm install @harmock/playwright
# or
yarn add @harmock/playwrightUsage
import { test } from '@harmock/playwright';
import path from 'path';
test.use({ baseURL: 'http://localhost:3000', harPath: path.join(__dirname, 'data.har') });
test('test', async ({ page }) => {
// Your test code
});