Unit Testing in JavaScript: Mocha & Unit.js
Unit Testing
| Intermediate
- 15 Videos | 1h 46m 31s
- Includes Assessment
- Earns a Badge
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.
WHAT YOU WILL LEARN
-
discover the key concepts covered in this courseinstall and configure the Mocha testing environmentinstall the Unit.js assertion libraryuse assertions to test boolean valuesuse assertions to test stringsmatch strings using regular expressions and custom functionscompare numeric values in testsuse assertions to test function objects
-
work with arrays and array elementscompare objects using equality operationstest objects using matchdetermine whether objects are instances of other objectssummarize the different ways to test errorsdescribe how values of different data types can be testedsummarize the key concepts covered in this course
IN THIS COURSE
-
1.Course Overview2m 8sUP NEXT
-
2.Installing and Configuring Node.js, npm, and Mocha10m 1s
-
3.Installing Unit.js7m 27s
-
4.Testing Booleans8m 31s
-
5.Testing Strings5m 50s
-
6.Testing Strings with Match6m 54s
-
7.Testing Numbers9m 59s
-
8.Testing Functions5m 21s
-
9.Testing Arrays10m 6s
-
10.Testing Objects Using Equality Comparisons6m 29s
-
11.Testing Objects Using Match7m 38s
-
12.Testing Objects Using Instance Of3m 48s
-
13.Testing Exceptions10m 23s
-
14.Testing Values10m 47s
-
15.Course Summary1m 11s
EARN A DIGITAL BADGE WHEN YOU COMPLETE THIS COURSE
Skillsoft is providing you the opportunity to earn a digital badge upon successful completion of this course, which can be shared on any social network or business platform
Digital badges are yours to keep, forever.