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/

diagram
Blog
Virginia

Reimagining Company Logos

A company’s logo is important, whether you’re starting a business or refreshing your look. Having a timeless logo allows you to capture your customers’ attention and become memorable.

Read More »
Blog
Virginia

Responding to Reviews

Could making your company shine be as easy as responding to customer reviews? In this article you will learn why simply replying to customers’ reviews is so important in making each customer feel valued, appreciated and ultimately validated.

Read More »
a person standing on top of a mountain
Blog
Virginia

The Rise of Solo Travel

Over the past few years, solo trips have become a growing trend in the tourism industry. With more and more people deciding to travel alone, one factor has endured — tourists want to have fun!

Read More »

Request a Demonstration