Last active
August 29, 2015 13:55
-
-
Save marcusoftnet/8767394 to your computer and use it in GitHub Desktop.
How I write mocha
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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