When I read unit tests I think TDD-style unit tests.
Are those the kind of unit tests you are referring to?
The TDD-style unit tests are not created for the purpose of testing, they are created for the purpose of design. As a byproduct, having a suite of unit tests to ensure basic correctness and detect basic correctness regressions is a nice residual value.
TDD has a very strong stance to avoid writing unit tests pre-maturely. Rather it advocates just-in-time creation of unit tests, and not a moment before.
I'm not familiar with Jest. Probably would have been useful back when I was working in TypeScript.
Front-end Engineer and Tester. I have a course at https://learn.webdriver.io and I do free coding tutorials at https://www.youtube.com/user/medigerati/
I love the concept of TDD, but have found it applies more to server-side type scripts than front-end work. For front-end, there's a lot of user interaction embedded in the code, which can make TDD harder to practice (but not impossible).
Some of the most fun I've had writing code was building out a component TDD style. That said, the component had very little user interaction, but a lot of logic going on. It fit the bill perfectly for TDD.
When I read unit tests I think TDD-style unit tests.
Are those the kind of unit tests you are referring to?
The TDD-style unit tests are not created for the purpose of testing, they are created for the purpose of design. As a byproduct, having a suite of unit tests to ensure basic correctness and detect basic correctness regressions is a nice residual value.
TDD has a very strong stance to avoid writing unit tests pre-maturely. Rather it advocates just-in-time creation of unit tests, and not a moment before.
I'm not familiar with Jest. Probably would have been useful back when I was working in TypeScript.
I love the concept of TDD, but have found it applies more to server-side type scripts than front-end work. For front-end, there's a lot of user interaction embedded in the code, which can make TDD harder to practice (but not impossible).
Some of the most fun I've had writing code was building out a component TDD style. That said, the component had very little user interaction, but a lot of logic going on. It fit the bill perfectly for TDD.
Thanks for the response!
One of the big proponents of TDD is Robert Martin.
Robert Martin does not think user interaction (UI) part of a program is suitable for TDD, as per When TDD Does Not Work.
Just thought you might be interested. ;-)