Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@marcusoftnet
Last active August 29, 2015 13:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marcusoftnet/8767394 to your computer and use it in GitHub Desktop.
Save marcusoftnet/8767394 to your computer and use it in GitHub Desktop.
How I write mocha
// first just write the top level describe function
describe('Users');
// now add an empty function to the describe function
describe('Users', function (){});
// add two line breaks and fill the function out
describe('Users', function (){
describe('Validation');
describe('Storage');
});
// repeat for the nested describes
describe('Users', function (){
describe('Validation', function (){});
describe('Storage', function (){});
});
// and create some space for the content, the it-statments.
describe('Users', function (){
describe('Validation', function (){
});
describe('Storage', function (){
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment