Skip to content

Instantly share code, notes, and snippets.

@romaricpascal
Created May 30, 2013 15:21
Show Gist options
  • Save romaricpascal/5678707 to your computer and use it in GitHub Desktop.
Save romaricpascal/5678707 to your computer and use it in GitHub Desktop.
A little Mocha + Chai test to illustrate a blog post
describe('add()', function() {
it('Adds the character to the cast', function (){
var cast = new MovieCast([{name:'Mickey'},{name: 'Pluto'}]);
var newCharacter = {name:'Goofy'};
cast.add(newCharacter);
expect(cast.size()).to.equal(3);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment