@storybook/addon-storyshots
Version:
Take a code snapshot of every story automatically with Jest
14 lines (13 loc) • 520 B
TypeScript
/**
* Provides functionality to convert your raw story to the resulting markup.
*
* Storybook snapshots need the rendered markup that svelte outputs,
* but since we only have the story config data ({ Component, data }) in
* the Svelte stories, we need to mount the component, and then return the
* resulting HTML.
*
* If we don't render to HTML, we will get a snapshot of the raw story
* i.e. ({ Component, data }).
*/
declare function getRenderedTree(story: any): HTMLElement;
export default getRenderedTree;