The TDD interface providessuite(),test(),suiteSetup(),suiteTeardown(),setup(), andteardown():
suite('Array', function() {
setup(function() {
// ...
});
suite('#indexOf()', function() {
test('should return -1 when not present', function() {
assert.equal(-1, [1,2,3].indexOf(4));
});
});
});
Hi Ascani! 8-)Ha! It seems like Mocha has a different set of methods for the TDD interface. Check what the docs say: