Mocha and Chai 🍵

Run tests before you deploy. This sample project shows you how you can hook-up Mocha with Chai to run tests before deployment. You engage in test driven development (TDD) by writing your unit tests before you write your functions. View your test results in the Logs. 😄

We test:

  1. the built-in Array.indexOf function ✔️
  2. a client-side module function called yesOrNo ✔️
  3. a Remote REST API which returns a JSON object ✔️

Add Your Own Tests and Functions ❤️

References:

Example successful results :

test results