import { create } from 'react-test-renderer'; import Collection from './Collection'; test('Collection with default viewport', () => { const tree = create(
{idx}
} />, ).toJSON(); expect(tree).toMatchSnapshot(); }); test('Collection with limited viewport', () => { const tree = create(
{idx}
} viewportHeight={50} viewportLeft={100} viewportTop={100} viewportWidth={50} />, ).toJSON(); expect(tree).toMatchSnapshot(); }); test('Collection with limited viewport and a few items', () => { const tree = create(
{idx}
} viewportHeight={100} viewportLeft={50} viewportTop={50} viewportWidth={100} />, ).toJSON(); expect(tree).toMatchSnapshot(); });