describe(\'some test\', function(){
// Could put here a shared variable
it(\'should pass a value\', function(done){
done(null, 1);
});
it(\'a
Very much agree with what Louis said, and those are the reasons that Mocha doesn't actually support it. Think of the async method you referenced; if your first test fails you get a waterfall failure across the rest of them.
Your only way to go about it is, as you say, to stick a variable at the top:
describe('some test', function(){
var value = 0;
it('should pass a value', function(done){
value = 5;
done();
});
it('and then double it', function(done){
console.log(value * 2); // 10
done();
});
});