Unit Testing in JavaScript: Mocha & Chai
Unit Testing
| Intermediate
- 12 videos | 57m 34s
- Includes Assessment
- Earns a Badge
This 12-video course offers a detailed exploration of the Chai assertion framework, an assertion library available in JS (Javascript) to perform unit testing. In this course, you will learn how to install and set up the Chai assertion library on your computer, and learn to use two kinds of application programming interfaces (APIs) that Chai offers for assertions. Learners will examine Chai APIs for both test-driven development and behavior-driven development, and will write unit tests by using the classic API. Learn to use the classic assertion API as well as the Should and Expect API in Chai to test numbers, Booleans, strings, objects and object properties, and arrays. Explore how to use Should to chain multiple assertions together. Then learn how to run tests on simple data types, including Boolean strings and numbers, and on complex data types such as arrays and objects, all using Chai, and examine behavior-driven development by using the Should and Expect APIs. This course compares test-driven development and behavior-driven development. Finally, explore the Expect API.
WHAT YOU WILL LEARN
-
Discover the key concepts covered in this courseInstall the chai library on your local machineUse assertions to test boolean valuesCompare numeric values using assertPerforming string comparisons using assertDescribe the assertions that can be used to test objects and their properties
-
Use arrays and elements in arrays using assertCompare and contrast the should and expect apis in chaiTest different data types using shouldTest different data types using expectPerform asynchronous function testing using expectSummarize the key concepts covered in this course
IN THIS COURSE
-
2m 7s
-
3m 51sIn this video, you will install the Chai library on your local machine. FREE ACCESS
-
7m 35sIn this video, you will use assertions to test boolean values. FREE ACCESS
-
8m 6sIn this video, learn how to compare numeric values using the assert keyword. FREE ACCESS
-
3m 4sIn this video, you will learn how to perform string comparisons using assert. FREE ACCESS
-
9mAfter completing this video, you will be able to describe assertions that can be used to test objects and their properties. FREE ACCESS
-
1m 53sIn this video, you will learn how to use arrays and elements in arrays using assertions. FREE ACCESS
-
4m 26sIn this video, learn how to compare and contrast the should and expect APIs in Chai. FREE ACCESS
-
3m 49sIn this video, you will learn how to test different data types using the "should" command. FREE ACCESS
-
6m 7sIn this video, find out how to test different data types using the expect function. FREE ACCESS
-
6m 18sIn this video, learn how to perform asynchronous function testing using the expect function. FREE ACCESS
-
1m 18sIn 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.