Unit Testing in JavaScript: Mocha & Unit.js

placeholder

Unit testing on software development paradigms the support testing provided and the assertion libraries available in JS (Javascript) are explored in this 15-video course. First you will learn to use the Node.js environment on your local machine and use the NPM package manager to install Mocha and Unit.js. Learners will then study the functionality of Mocha and how to build suites of tests. You will also learn how to use Sinon to construct spies stubs and mocks and how it works with Mocha. Continue by learning how to use the Unit.js assertion library to test your code. This course examines the various assertions that Unit.js offers to test simple data types such as Booleans numbers and strings. You will learn how to test more complex data types including functions and arrays and to test the objects. You will also learn how to check individual properties of an object by using custom functions as well as regular expressions. Finally examine unit testing of functions that throw several kinds of errors.