Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (function(){
- var MyObject = function(){
- var myCount= 0;
- return{
- count: myCount
- };
- }();
- module.exports = MyObject
- })();
- (function(){
- var assert = require("assert");
- describe("actual test", function(){
- it("should start with count of zero", function(){
- var obj = require("../mochatest.js");
- assert.equal(obj.count, 0);
- });
- it("should be able to increment counter", function(){
- var obj = require("../mochatest.js");
- obj.count=1;
- assert.equal(obj.count, 1);
- });
- it("should start with count of zero", function(){
- var obj = require("../mochatest.js");
- assert.equal(obj.count, 0);
- });
- });
- })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement