import { create } from 'react-test-renderer'; import Collage from './Collage'; type CollageImageProps = { width: number; height: number; index: number; }; describe('', () => { function CollageImage({ width, height, index }: CollageImageProps) { return
{index}
; } const collageProps = { columns: 2, gutter: 2, height: 200, width: 300, renderImage: CollageImage, } as const; it('should match the snapshot', () => { expect(create().toJSON()).toMatchSnapshot(); }); it('should match the snapshot for 3 columns', () => { expect(create().toJSON()).toMatchSnapshot(); }); it('should match the snapshot for 4 columns', () => { expect(create().toJSON()).toMatchSnapshot(); }); it('should match the snapshot for 4 columns with a custom layout key', () => { expect( create().toJSON(), ).toMatchSnapshot(); }); it('should match the snapshot when cover image is used', () => { expect(create().toJSON()).toMatchSnapshot(); }); });