Chai

Chai is a test-assertion library that supports test-driven development (TDD) and behavior-driven development (BDD) test styles. The main goal of Chai is to reduce the amount of work necessary to create a test assertion and make the test more readable. We can install Chai using the following command:

npm install --save-dev chai @types/chai  
Please note that we are going to learn more about TDD and BDD later in this chapter in the section titled Testing methodologies.

Get Learning TypeScript 2.x - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.