import { create } from 'react-test-renderer'; import List from './List'; import Text from './Text'; describe('List', () => { it('renders a bare unordered list', () => { const tree = create( , ).toJSON(); expect(tree).toMatchSnapshot(); }); it('renders an unordered list', () => { const tree = create( , ).toJSON(); expect(tree).toMatchSnapshot(); }); it('renders an ordered list', () => { const tree = create( , ).toJSON(); expect(tree).toMatchSnapshot(); }); it('renders an mixed list', () => { const tree = create( , ).toJSON(); expect(tree).toMatchSnapshot(); }); it('renders an list with a custom label', () => { const tree = create( label test} type="ordered"> , ).toJSON(); expect(tree).toMatchSnapshot(); }); it('renders an list with a hidden label', () => { const tree = create( , ).toJSON(); expect(tree).toMatchSnapshot(); }); it('renders an condensed list', () => { const tree = create( , ).toJSON(); expect(tree).toMatchSnapshot(); }); it('renders an list item with custom text', () => { const tree = create( List item text} /> , ).toJSON(); expect(tree).toMatchSnapshot(); }); });