Testing Philosophy

Why do we test?

TDD (Test Driven Develpoment)

TDD is one way for developers to ensure that the code written by every member of their team is testable and modular. Some of the reasons why TDD include:

Red-Green-Refactor

The Test-driven development workflow can be broken down intro three simple steps. Red, Green, Refactor:

  1. Red:
  1. Green:
  1. Refactor:

What do we test?

When you’re trying to figure out what you should be testing, ask yourself, “What is (or will be) the public interface of the module or class I’m writing?” That is, what are the functions that the outside world will have access to and rely on?

The Testing Pyramid

Mocha

Mocha is a JavaScript testing framework that specializes in running tests and presenting them in an organized user friendly way.

DSL (Domain Specific Language)

When writing tests with Mocha we will be using Mocha’s DSL (Domain Specific Language). A Domain Specific Language refers to a computer language specialized for a particular purpose - in Mocha’s case the DSL has been engineered for providing structure for writing tests.