You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Each test file lives inside the component folder with a standard name (index.test.js). That's a basic and common test:
importReactfrom'react'import{shallow}from'enzyme'importComponentfrom'.'it('renders children when passed in',()=>{constwrapper=shallow(<Component>test</Component>)expect(wrapper.contains('test')).toBe(true)})
All components except the one being tested are mocked in test/componentsMock.js. That makes it easier to write real unit tests.