2 title: Mocha.js TDD interface
3 category: JavaScript libraries
10 suite('something', function() {
14 test('should work', function() {
23 test('should save', function(done) {
24 var user = new User();
25 user.save(function(err) {
33 var expect = chai.expect;
35 expect(foo).to.be.a('string');
36 expect(foo).to.equal('bar');
37 expect(foo).to.have.length(3);
38 expect(tea).to.have.property('flavors').with.length(3);
42 * [Mocha BDD](mocha.html)
43 * [Mocha HTML](mocha-html.html)
46 * [Sinon Chai](sinon-chai.html)