Advertisement
Guest User

Untitled

a guest
Nov 22nd, 2014
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. (function(){
  2. var MyObject = function(){
  3. var myCount= 0;
  4. return{
  5. count: myCount
  6. };
  7. }();
  8. module.exports = MyObject
  9. })();
  10.  
  11. (function(){
  12. var assert = require("assert");
  13.  
  14. describe("actual test", function(){
  15.  
  16. it("should start with count of zero", function(){
  17. var obj = require("../mochatest.js");
  18. assert.equal(obj.count, 0);
  19. });
  20. it("should be able to increment counter", function(){
  21. var obj = require("../mochatest.js");
  22. obj.count=1;
  23. assert.equal(obj.count, 1);
  24. });
  25. it("should start with count of zero", function(){
  26. var obj = require("../mochatest.js");
  27. assert.equal(obj.count, 0);
  28. });
  29. });
  30. })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement