E
E
Evgeny Zalivadny2021-02-24 13:20:11
React
Evgeny Zalivadny, 2021-02-24 13:20:11

How to embed tests in a finished React app?

I have a working React app. What is the best approach to writing tests and what tools are better to use, for example, for user registration, password reset, authorization? Should I use Jest+Enzyme, or is there something better? Also I will be grateful for suitable tutorials. Part of the project is in typescript, part is not.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
alex4answ, 2021-02-24
@alex4answ

Just like in a non-ready React application:
Take some jest + react-testing-library and
1. Write snapshots for components
2. Write tests for services and logic

for user registration, password reset, authorization?

Use mocks, stubs and everything, testing the finished one is no different from testing an application that is in progress

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question