Norbert de Langen 8f6ae4e705 FIX portal issue
2019-02-06 19:00:13 +01:00

21 lines
661 B
JavaScript

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