Advertisement
Guest User

Untitled

a guest
Aug 31st, 2015
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. 'use strict';
  2.  
  3. var chai = require('chai'),
  4. expect = chai.expect; //Add support for expect-style assertions
  5.  
  6. chai.should(); //add support for should-style assertions
  7.  
  8. //Define test suite
  9. describe('MySpec', function() {
  10. var objTotest;
  11.  
  12. // Runs once before each suite
  13. before(function () {
  14. //Setup here
  15. });
  16.  
  17. // Runs once after each suite - cleanup
  18. after(function () {
  19. //Teardown here
  20. });
  21.  
  22. // Runs before each spec - set initial state
  23. beforeEach(function () {
  24. objToTest = new MyObj();
  25. });
  26.  
  27. // Runs after each spec - cleanup
  28. afterEach(function () {
  29. //Cleanup here
  30. });
  31.  
  32. // Describe specification
  33. describe('Add', function () {
  34. //Define what it should do
  35. it('should return the sum of both operands', function () {
  36. // Expect desired outcome
  37. });
  38. });
  39. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement