Skip to content

Instantly share code, notes, and snippets.

@theotherzach
Last active December 21, 2015 00:38
Show Gist options
  • Save theotherzach/6221390 to your computer and use it in GitHub Desktop.
Save theotherzach/6221390 to your computer and use it in GitHub Desktop.

https://github.com/visionmedia/mocha/blob/master/lib/hook.js

It boils down to something like this:

"use strict";
function MyClass(arg1) { 
  this.instanceVariable = arg1;
// stuff
}
 
function privateFunction() {
// stuff
}
 
MyClass.prototype._privateMethod = function () {
//stuff
};
 

MyClass.prototype.publicMethod = function () {
//stuff
};
 
module.exports = MyClass;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment