Testing JavaScript
A sample repository on how to test ES6/7 JavaScript applications.
Overview
This is a clonable repository that shows you how to write tests using some of the latest and greatest tools for testing JavaScript applications. It covers using:
- Mocha
- Sinon
- Chai
- sinon-chai
- chai-as-promised
This setup allows writing the latest ES6/7 JavaScript including support for the new import/export module syntax, async/await, arrow functions and more.
Setup
- Install nvm
- Setup proper Node version:
nvm install && nvm use - Install dependencies:
npm install - Run tests:
npm test
You can watch for changes with your test suite with npm run watch-test.