Welcome to Test Automation University.

My name is Aparna Gopalakrishnan. In this course, we will learn how to use assertions in JavaScript using Chai.

  • We will discuss, what is an assertion and why is it required?

  • We will also learn how to install Chai from terminal or command line interface.

  • We will see the different assertion styles provided by Chai, which are assert, expect, and should.

  • We will also cover differences, should extras, and configurations.

Later, we will see how to add Chai to an existing project, and how assertions can be handled centrally in a project.

Please Note

Though the example project which we are using here is on Mocha and Webdriver IO, the same concepts can be applied to any JavaScript project.

By the end of this course, you will be able to write assertions using Chai to your JavaScript framework.

We will be using WebStorm IDE and Terminal for script development and execution. But you can use any IDE that supports JavaScript programming to practice yourself.

So, let's begin.

© 2024 Applitools. All rights reserved. Terms and Conditions Privacy Policy GDPR