Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 'use strict';
- var chai = require('chai'),
- expect = chai.expect; //Add support for expect-style assertions
- chai.should(); //add support for should-style assertions
- //Define test suite
- describe('MySpec', function() {
- var objTotest;
- // Runs once before each suite
- before(function () {
- //Setup here
- });
- // Runs once after each suite - cleanup
- after(function () {
- //Teardown here
- });
- // Runs before each spec - set initial state
- beforeEach(function () {
- objToTest = new MyObj();
- });
- // Runs after each spec - cleanup
- afterEach(function () {
- //Cleanup here
- });
- // Describe specification
- describe('Add', function () {
- //Define what it should do
- it('should return the sum of both operands', function () {
- // Expect desired outcome
- });
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement