Skip to content

Instantly share code, notes, and snippets.

@scheibinger
Last active December 16, 2015 01:38
Show Gist options
  • Save scheibinger/e72a8a9c4dc734e8d1a9 to your computer and use it in GitHub Desktop.
Save scheibinger/e72a8a9c4dc734e8d1a9 to your computer and use it in GitHub Desktop.
Good mocha test
//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