Add snapshotting to Animation Slider (https://github.com/woocommerce/woocommerce-admin/pull/819)
This commit is contained in:
parent
cd00227875
commit
ffaa80a95e
|
@ -0,0 +1,11 @@
|
||||||
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||||
|
|
||||||
|
exports[`AnimationSlider it renders correctly 1`] = `
|
||||||
|
<div
|
||||||
|
className="woocommerce-slide-animation animate-left"
|
||||||
|
>
|
||||||
|
<div>
|
||||||
|
<div />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
`;
|
|
@ -0,0 +1,23 @@
|
||||||
|
/** @format */
|
||||||
|
/**
|
||||||
|
* External dependencies
|
||||||
|
*/
|
||||||
|
import renderer from 'react-test-renderer';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Internal dependencies
|
||||||
|
*/
|
||||||
|
import AnimationSlider from '../';
|
||||||
|
|
||||||
|
describe( 'AnimationSlider', () => {
|
||||||
|
test( 'it renders correctly', () => {
|
||||||
|
const tree = renderer
|
||||||
|
.create(
|
||||||
|
<AnimationSlider animationKey={ 0 } animate={ 'left' }>
|
||||||
|
{ () => <div /> }
|
||||||
|
</AnimationSlider>
|
||||||
|
)
|
||||||
|
.toJSON();
|
||||||
|
expect( tree ).toMatchSnapshot();
|
||||||
|
} );
|
||||||
|
} );
|
Loading…
Reference in New Issue