concept chai in category node
appears as: chai

This is an excerpt from Manning's book Get Programming with Node.js.
chai is the assertion engine that you’ll use in this lesson. To use chai, require it in each test file you plan to run. Then, like the assert method from your core module, you can use expect, should, or assert as function verbs to check whether your code returns the intended results in your tests. For the following examples, use the expect function. chai also has descriptive functions to help you explain your tests before the assertions themselves. You’ll use the describe function to specify the module and function you’re testing.