UNPKG

@lewiswright/vitest-plugin-vis

Version:
14 lines (13 loc) 462 B
export function playwright(context) { return { async takeScreenshot(filePath, selector, options) { // The `Locator` type from `vitest` has less props than the `Locator` in `playwright` const subject = context.iframe.locator(selector); return subject.screenshot({ timeout: options?.timeout, animations: 'disabled', path: filePath, }); }, }; }