Q
Q
qfrontend2020-05-19 16:01:42
Test Driven Development
qfrontend, 2020-05-19 16:01:42

Do I need to write tests (Jest / Enzyme) in a React application written in TypeScript?

Greetings)
Do I need to write tests (Jest / Enzyme) in a React application written in TypeScript?
After all, everything is strictly typed there ... does it make sense?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dmitry Belyaev, 2020-05-20
@bingo347

The most harmful myth that exists in the typescript community: "Typing will protect against errors"
It won't!
Typing is not for this, it is to speed up and reduce the cost of long-term development.
Well, if you also remember that typescript has structural typing (no one bothers to add rubles to kilograms) and at the same time it has the any type, then it immediately becomes clear that there is no need to talk about any reliability.

R
Robur, 2020-05-20
@Robur

After all, everything is strictly typed there ... does it make sense?

find logic error and type error:
//returnы number increased by one
function addOne(a: number) {
 return a-1
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question