preact-render-to-json
Render JSX and Preact components to JSON. Useful for Jest Snapshot testing.
Usage with Jest
/** @jsx preact.h */ let component = <div class="foo">content</div>;
Render JSX and Preact components to JSON. Useful for Jest Snapshot testing.
/** @jsx preact.h */ let component = <div class="foo">content</div>;
npm i preact-render-to-json
590
3.6.6
MIT