Test Driven Development (TDD) and Unit Testing

Jest is a popular unit testing framework maintained by Facebook. it can help to write unit tests including all major javascript frameworks such as NestJS, Node.js, React etc in a more organized and efficient way.

Jest is a testing framework created by Facebook and it’s built on top of Jasmine so we can use the same syntax. It also keeps our tests very DRY with its snapshot test feature. In order to get started with Jest, we will first need to install it globally in our application: npm install -g jest

After installing Jest, you can create a sample test file to get familiar with its syntax and features. TDD is a software development process relying on software requirements being converted to test cases before the software is fully developed, and tracking all software development by repeatedly testing the software against all test cases. This is as opposed to software being developed first and test cases created later.

This video discuss about best practices and thing should DO and DON’t when use jest.