File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change 1
1
/* eslint-disable import/no-extraneous-dependencies */
2
- import initStoryshots from '@storybook/addon-storyshots' ;
2
+ import initStoryshots , {
3
+ snapshotWithOptions ,
4
+ } from '@storybook/addon-storyshots' ;
3
5
4
- initStoryshots ( ) ;
6
+ initStoryshots ( {
7
+ test : snapshotWithOptions ( {
8
+ createNodeMock : ( ) => ( { } ) ,
9
+ } ) ,
10
+ } ) ;
Original file line number Diff line number Diff line change @@ -15,7 +15,9 @@ import DefaultNodeRenderer from './node-renderer-default';
15
15
describe ( '<SortableTree />' , ( ) => {
16
16
it ( 'should render tree correctly' , ( ) => {
17
17
const tree = renderer
18
- . create ( < SortableTree treeData = { [ { } ] } onChange = { ( ) => { } } /> )
18
+ . create ( < SortableTree treeData = { [ { } ] } onChange = { ( ) => { } } /> , {
19
+ createNodeMock : ( ) => ( { } ) ,
20
+ } )
19
21
. toJSON ( ) ;
20
22
21
23
expect ( tree ) . toMatchSnapshot ( ) ;
You can’t perform that action at this time.
0 commit comments