@storybook/addon-storyshots
Version:
Take a code snapshot of every story automatically with Jest
14 lines (11 loc) • 359 B
JavaScript
import path from 'path';
import { mount, configure } from 'enzyme';
// @ts-expect-error (Converted from ts-ignore)
import Adapter from 'enzyme-adapter-react-16';
import initStoryshots from '../src';
configure({ adapter: new Adapter() });
initStoryshots({
framework: 'react',
configPath: path.join(__dirname, 'exported_metadata'),
renderer: mount,
});