2018-12-22 00:15:03 +01:00

16 lines
482 B
JavaScript

import path from 'path';
import initStoryshots, { multiSnapshotWithOptions } from '@storybook/addon-storyshots';
import { render as renderer } from 'enzyme';
import { createSerializer } from 'enzyme-to-json';
// HTML Snapshots
initStoryshots({
framework: 'react',
configPath: path.join(__dirname, '../'),
integrityOptions: { cwd: path.join(__dirname, '..', 'stories') },
test: multiSnapshotWithOptions({
renderer,
}),
snapshotSerializers: [createSerializer()],
});