jeudi 18 juillet 2019

Is it still "unit testing" if you're using React Testing Library / Enzyme's mount function?

We're currently unit testing our React application with Enzyme's shallow render function. Every component is tested in isolation so I understand why this is called "unit testing".

We're moving towards rendering the component and it's children. You can do this with Enzyme's mount function or with React Testing Library as it never shallow renders. This also means we have to mock Redux if it's a connected component.

What is the name for this type of testing? I've heard it called "integration testing", but when I say this at work people think that I mean something else. Is it still a type of "unit testing" despite the fact that multiple components are tested together?

Aucun commentaire:

Enregistrer un commentaire