maurogestoso
2/9/2017 - 9:26 AM

Template for a JavaScript unit test using mocha and chai

Template for a JavaScript unit test using mocha and chai

var expect = require('chai').expect;
var myModule = require('./path/to/myModule');

// For each unit test you write,
// answer these questions:
describe('What component aspect are you testing?', function () {
  it('What should the feature do?', function () {
    var actual = 'What is the actual output?';
    var expected = 'What is the expected output?';
    expect(actual).to.equal(expected);
  });
});