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
-
2m 8s
-
10m 1sIn this video, you will learn how to install and configure the Mocha testing environment. FREE ACCESS
-
7m 27sDuring this video, you will learn how to install the Unit.js assertion library. FREE ACCESS
-
8m 31sIn this video, find out how to use assertions to test for boolean values. FREE ACCESS
-
5m 50sDuring this video, you will learn how to use assertions to test for strings. FREE ACCESS
-
6m 54sIn this video, you will learn how to match strings using regular expressions and custom functions. FREE ACCESS
-
9m 59sLearn how to compare numeric values in tests. FREE ACCESS
-
5m 21sFind out how to use assertions to test function objects. FREE ACCESS
-
10m 6sIn this video, find out how to work with arrays and array elements. FREE ACCESS
-
6m 29sIn this video, you will compare objects using equality operators. FREE ACCESS
-
7m 38sLearn how to test objects using a match. FREE ACCESS
-
3m 48sTo find out how to determine if an object is an instance of another object, consult a Java reference guide. FREE ACCESS
-
10m 23sIn this video, learn how to summarize the different ways to test for errors. FREE ACCESS
-
10m 47sAfter completing this video, you will be able to describe how values of different data types can be compared. FREE ACCESS
-
1m 11sIn this video, we will summarize the key concepts covered in this course. FREE ACCESS
EARN A DIGITAL BADGE WHEN YOU COMPLETE THIS COURSE
Skillsoft is providing you the opportunity to earn a digital badge upon successful completion on some of our courses, which can be shared on any social network or business platform.
Digital badges are yours to keep, forever.