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/

someone ideating on a white board with comps
Release Notes
TRYTN

July 2021 Release Notes

We’ve spent all of July trying to squash as many bugs as possible while also adding simple enhancements to make the system easier to use.

Read More »
someone ideating on a white board with comps
Release Notes
TRYTN

June 2021 Release Notes

We’ve been hard at work making the system more responsive and resilient. We’ve added another data center in the Eastern United States, updated how we

Read More »

Request a Demonstration