Test your Frontend JavaScript Code


A unit is a small section of code. Unit testing means you test that bit of code to make sure it functions properly. This increases confidence in your code.

Unit tests are important when many people work on the same codebase. If one engineer changes code in one part of the project, you want to ensure that the rest of the project still works.

Unit tests are especially important in dynamically typed languages such as JavaScript, since there is no compiler to catch common problems.

Below are the some of the articles written by Matt how we can test the JavaScript code:

1) JavaScript unit testing: guiding principles and common excuses By Matt Harrington

2) How to write JavaScript unit tests with Mocha By Matt Harrington

3) JavaScript unit testing: using the Chutzpah test runner in Visual Studio By Matt Harrington

4) Using Mocha JS, Chai JS and Sinon JS to Test your Frontend JavaScript Code

Hope this will help !!!

Jay Ganesh

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s