T
T
t800zippygod2020-08-04 21:24:50
JavaScript
t800zippygod, 2020-08-04 21:24:50

What's wrong with Snapshot when testing on Enzyme?

it('should render', () => {
    const component = shallow(<SubHeader />)
    expect(component).toMatchSnapshot()
  })

Hello everyone)) this code produces a snapshot with the content: `ShallowWrapper {}`;
Everything seemed to be done clearly, enzyme installed, the adapter for react-16 too. But gives such a game, why?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question