DEV Community

Discussion on: Writing Well-Structured Unit Test in TypeScript

Collapse
 
arifintahu profile image
Miftahul Arifin • Edited

To me, testing entry points and service methods would have different scopes. Testing service methods requires fully covered code and condition in every method, we can call it white-box testing. On the other hand, the scope of testing entry points or E2E testing is checking the request and response of the APIs whether expected or not. In E2E testing is like black-box testing, we don't have to know whether it's fully covered the service layer or not.

Good reference : methodpoet.com/unit-tests-vs-end-t...