import React from 'react'; import {create, act, ReactTestRenderer} from 'react-test-renderer'; import {Section} from '../LeftNav'; const items = [ {key: 'all_new', label: 'All New', count: 5500, isSelected: false}, {key: 'woman', label: 'Woman', count: 4500, isSelected: true}, {key: 'clothing', label: 'Clothing', count: 2300, isSelected: false} ]; let component: ReactTestRenderer; act(() => { component = create(
new Function()} onClear={() => new Function()} items={items} /> ); }); describe('LeftNav Section', () => { it('matches snapshot', () => { expect(component.toJSON()).toMatchSnapshot(); }); });