Package Spotlight: Chai

Package Spotlight: Chai

Chai is a TDD (test-driven development) and BDD (behavior-driven development) assertion library for JavaScript. This package allows you to assert what a test should have as a result. As a simple example consider the mathematical expression 2 + 2. You would assert that 2 + 2 = 4. If the actual result of that calculation is 4 the test passes. Any other result causes the assertion to fail.

An assertion library is a critical piece to being able to test the code that exists in the system. We have at least 5,000 assertions in our test cases (and growing). We have this many because we want to test many different instances. Say, as an example, we return a specific error code if someone doesn’t pass an expected result. We need an assert statement for each possible value that isn’t the expected to make sure the test passes (and therefore the code returns the failure as we would expect.)

Package Name: Chai
Website: https://www.chaijs.com/

a person holding a flower
News
Virginia

Virginia Introduction

Traveling and experiencing new places has always been a passion for Virginia. Born in New York City and raised in Alabama, her love of travel

Read More »
a close up of a tree
Blog
Virginia

Holiday Promotions and Giveaways

Holiday season is almost here! Not only do holidays spread joy and bring family and friends together, but they can also be an excellent time to increase your website traffic.

Read More »
a man using a laptop computer sitting on top of a table
Feature Announcements
TRYTN

Custom Invoice Emails

We recently enhanced our invoicing capabilities in a big way. Each tour operator has specific business needs and so a one-size-fits-all invoice email just didn’t

Read More »

Request a Demonstration