npm install --save-dev mocha
describe('MyTestSuite', function() {
// Tests go here
it('should return true when conditions are met', function() {
// Test assertions go here
});
});
Mocha is a javascript testing framework.
npm install --save-dev chai
describe('MyTestSuite', function() {
// Tests go here
it('should add two numbers correctly', function() {
expect(2 + 3).to.equal(5);
});
});
Chai provides more assertions styles.