diegomura / diegomura/react-pdf
Expose renderToImage for library user's own tests
- Dominant language
- TypeScript
- Stars
- 16.8k
- Forks
- 1.3k
- Avg merge
- 5h 6m
- Merged PRs (30d)
- 52
Description
**Is your feature request related to a problem? Please describe.**
I'd like to snapshot test my own PDFs that are generated with react-pdf. I note that the library already uses snapshot testing with vitest and jest-image-snapshot internally, and this would be a good solution for my own project that consumes react-pdf
**Describe the solution you'd like**
Include https://github.com/diegomura/react-pdf/blob/3f5bf67d84ee784b6685cf603f04ac5f568a146d/packages/renderer/tests/renderComponent.js#L116-L117 as an export of the library
**Describe alternatives you've considered**
Reimplement this functionality in my own vitest tests - very doable but it'd be convenient to keep that complexity in react-pdf where it's already used and tested
Contributor guide
Assessment
This issue has not been assessed yet.