The ability to reply to discussions is limited to PRO members. Want to join in the discussion? Click here to subscribe now.

JavaScript Testing Fundamentals: Hello world unit test with Mocha (in ES6)

JavaScript Testing Fundamentals: Hello world unit test with Mocha (in ES6)

6:15
Mocha is a testing framework that provides structure for unit tests. In this lesson, we will be setting up Mocha with npm and npm scripts, writing a "Hello World" unit test, then writing the code to make the test pass (as an example of Test Driven Development (TDD), with the "red-green-refactor" workflow).
Watch this lesson now
Avatar
egghead.io

Mocha is a testing framework that provides structure for unit tests. In this lesson, we will be setting up Mocha with npm and npm scripts, writing a "Hello World" unit test, then writing the code to make the test pass (as an example of Test Driven Development (TDD), with the "red-green-refactor" workflow).

Avatar
Gar

If using babel 6, use this in the package.json
"test": "mocha --compilers js:babel-core/register"

In reply to egghead.io
HEY, QUICK QUESTION!
Joel's Head
Why are we asking?