Why use these types of test instead of e2e tests? Currently I am only using jest to test api methods and util functions. For the ui i am just using cypress.
I think you probably right in most of the cases, but this article is intended to introduce testing for people just learning React or Front End development, who just want to get started with some simple test cases, and once they grasp the ideas, they can evolve whatever framework or tools they see fit in their situations. Beside, @Testing-library now is not just for React, it supports many other frameworks now in 2020, such as VUE, Angular, React Native, and even cypress, so I think it is a good starting point anyway. testing-library.com/docs/intro
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Why use these types of test instead of e2e tests? Currently I am only using jest to test api methods and util functions. For the ui i am just using cypress.
These types of tests are less expensive than a full-blown end-to-end. You should check this article by Kent C. Dodds which goes more into depth.
I think you probably right in most of the cases, but this article is intended to introduce testing for people just learning React or Front End development, who just want to get started with some simple test cases, and once they grasp the ideas, they can evolve whatever framework or tools they see fit in their situations. Beside, @Testing-library now is not just for React, it supports many other frameworks now in 2020, such as VUE, Angular, React Native, and even cypress, so I think it is a good starting point anyway.
testing-library.com/docs/intro