Below is the code in my component
export default () => null;
How to write test case for this to get coverage for the function
CodePudding user response:
It is just a function you can do this:
import Empty from './Empty'
test('renders null', () => {
const res = Empty()
expect(res).toBeNull()
})