danawoodman / testing-js

Examples on testing JavaScript applications using Babel, Mocha, Sinon, Chai and friends.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

  1. Install nvm
  2. Setup proper Node version: nvm install && nvm use
  3. Install dependencies: npm install
  4. Run tests: npm test

You can watch for changes with your test suite with npm run watch-test.

About

Examples on testing JavaScript applications using Babel, Mocha, Sinon, Chai and friends.


Languages

Language:JavaScript 100.0%