This is a high level overview of the JavaScript testing frameworks. These are some notes I took, which reading AngularJS Test Driven Development, which is fantastic book.

Karma

  • Karma is a test runner, not a test framework
  • Can run in multiple web browsers

Protractor

  • Protractor is an end-to-end testing framework
  • Allows developers to mimic user interaction

Jasmine

  • JavaScript testing framework
  • Integrates nicely with Karma by default
  • Provides: Tests, spies, and pass-through functionality
  • Syntax supports testing the behaviour
  • Best to use for AngularJS

Mocha

  • Originally written for Node.js
  • Supports browser testing
  • Best for testing Node.js because you can add New npm modules for the plugins that your require.