Create a NodeJS API with Koa and TypeScript - #6 - Testing With Jest

Published: 02 May 2020
on channel: Code Review Videos
3,182
43

Before going much further, bringing Jest / testing in to the mix is a good idea. Start off early with testing, and you (or I) am much more likely to continue with it throughout the rest of the project. If you add in tests as an after thought, some of the risks include:

not fully testing your code
not completely trusting the tests
not building the habit of writing tests

That's just some. There are tons of downsides to not testing, and very few upsides. Having worked on plenty of large, real world projects without tests, let me tell you: it sucks.

Enough of the testing soapbox.

We have already added jest to our project in the initial project setup.

We also added in our Jest configuration to package.json, so we're good on that front to get started writing tests.


Watch video Create a NodeJS API with Koa and TypeScript - #6 - Testing With Jest online without registration, duration hours minute second in high quality. This video was added by user Code Review Videos 02 May 2020, don't forget to share it with your friends and acquaintances, it has been viewed on our site 3,182 once and liked it 43 people.