Last active
December 16, 2015 01:38
-
-
Save scheibinger/e72a8a9c4dc734e8d1a9 to your computer and use it in GitHub Desktop.
Good mocha test
This file contains hidden or 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
//describe what are you testing: given | |
describe('button widget', function(){ | |
//describe the aspect of object that you are testing: when | |
describe('when button is clicked', function(){ | |
//verify the expectation: then | |
it('onClickHandler should be called ', function(){ | |
expect(onClickHandler).to.have.been.called | |
}) | |
}) | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment