Unit Testing in JavaScript: Mocha & Chai

Unit Testing
  • 12 Videos | 1h 2m 34s
  • Includes Assessment
  • Earns a Badge
Likes 7 Likes 7
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 course
    install the Chai library on your local machine
    use assertions to test boolean values
    compare numeric values using assert
    performing string comparisons using assert
    describe the assertions that can be used to test objects and their properties
  • use arrays and elements in arrays using assert
    compare and contrast the should and expect APIs in Chai
    test different data types using should
    test different data types using expect
    perform asynchronous function testing using expect
    summarize the key concepts covered in this course

IN THIS COURSE

  • Playable
    1. 
    Course Overview
    2m 7s
    UP NEXT
  • Playable
    2. 
    Installing and Setting up Chai
    3m 51s
  • Locked
    3. 
    Testing Booleans with Assert
    7m 35s
  • Locked
    4. 
    Testing Numbers with Assert
    8m 6s
  • Locked
    5. 
    Testing Strings with Assert
    3m 4s
  • Locked
    6. 
    Testing Objects with Assert
    9m
  • Locked
    7. 
    Testing Arrays with Assert
    1m 53s
  • Locked
    8. 
    Should and Expect in Chai
    4m 26s
  • Locked
    9. 
    Testing Numbers, Booleans, and Arrays with Should
    3m 49s
  • Locked
    10. 
    Testing Strings, Arrays, and Objects with Expect
    6m 7s
  • Locked
    11. 
    Testing Asynchronous Operations with Expect
    6m 18s
  • Locked
    12. 
    Course Summary
    1m 18s

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.

YOU MIGHT ALSO LIKE

Likes 72 Likes 72  
Likes 18 Likes 18