[Node.js] Testing Node.js Applications 1

You should hear or read the article about a testing code. However, if you were a student or worked in small company, it is not easy to start your testing code.

 

Now Let's start to learn it What, How, and Why we use a testing applications in Node.js

 

1. What is Testing Code and It's Pros & Cons

Automated code testing provides cover all core features and run automatically after every code change, but it only tests what you define and hard to test UI.

 

2. Why Should You Use a Testing Code?

It's has several benefits, automatically test everything after every code adjustment, easily detect breaking changes, and ensure predictable and clearly defined testing steps.

 

3. Testing Tools and Set up

We are going to use three applications Mocha, Chai, and Sinon. Each application has their own role, such as Mocha runs a test, Chai asserts results, and Sinon managing side effects.

 

Next Post we really move to real testing world. install those applications and make a testing scripts!

 

Leave a Comment

en_USEnglish