visionmedia/mocha — pull request #429 by hokaccha (2012-05-14 04:30:44+00:00)
Title: Add `context` for BDD

Rspec has `context` it is alias of `describe`.

I think that the difference of word is important.

e.g

describe('Stack', function() {
context('when stack is empty', function() {
describe('Stack#size', function() {
it('returns 0');
});
describe('Stack#push', function() {
context('with string', function() {
it('increments stack size');
});
context('with null', function() {
it('throw error');
});
});
describe('Stack#pop', function() {
it('throw error');
});
});
});