index.test.js (435B)
1 import { shallow, mount } from 'enzyme'; 2 import {TabHeader} from '../'; 3 4 describe('Tab Header', () => { 5 // 1. Snapshot testing 6 it('renders correctly', () => { 7 const setSearchContext = jest.fn(); 8 const setActiveItemType = jest.fn(); 9 const wrapper = shallow(<TabHeader setSearchContext={setSearchContext} setActiveItemType={setActiveItemType} />); 10 expect(wrapper).toMatchSnapshot(); 11 }); 12 13 14 });