Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/doczilla-app/to-match-pdf-snapshot
Test visual regression of PDFs in Playwright.
https://github.com/doczilla-app/to-match-pdf-snapshot
pdf-snapshot playwright
Last synced: 3 months ago
JSON representation
Test visual regression of PDFs in Playwright.
- Host: GitHub
- URL: https://github.com/doczilla-app/to-match-pdf-snapshot
- Owner: Doczilla-APP
- License: mit
- Created: 2023-12-27T19:14:21.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-08-05T08:07:01.000Z (5 months ago)
- Last Synced: 2024-10-01T14:52:28.215Z (3 months ago)
- Topics: pdf-snapshot, playwright
- Language: TypeScript
- Homepage:
- Size: 2.22 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# toMatchPdfSnapshot
Test visual regression of PDFs in Playwright. The library utilizes pdf.js to convert PDF files to PNG format.
## Installation
Install the package with:
```sh
npm install to-match-pdf-snapshot
# or
yarn add to-match-pdf-snapshot
```### Usage in Playwright
Add the following line to your `playwright.config.ts`
```ts
import 'to-match-pdf-snapshot/playwright'
```For typescript users, add `node_modules/to-match-pdf-snapshot/dist/playwright` to your `tsconfig.json` types.
### Thanks
This library draws inspiration from [moshensky/pdf-visual-diff](https://github.com/moshensky/pdf-visual-diff). The key distinction lies in its exclusivity to Playwright, making the setup more straightforward compared to the mentioned library.