Skip to Content
Automate and Organize Tests

You can now write tests with Mocha and Node’s assert.ok() ! In this lesson you learned to:

  • Install Mocha with npm
  • Organize tests with describe() and it()
  • Ensure your tests are isolated and expressive with the four phases of a test
  • Ensure your tests are reliable with hooks
  • Write assertions with assert.ok()

As you continue to write tests, remember to always evaluate them against the characteristics of a good test: fast, complete, reliable, isolated, maintainable, and expressive. If you are meeting these six criteria, you are creating high quality test frameworks!

Folder Icon

Sign up to start coding

Already have an account?