describe('some test', function(){
// Could put here a shared variable
it('should pass a value', function(done){
done(null, 1);
});
it('and then double it', function(value, done){
console.log(value * 2);
done();
});
});
The above currently would not work in mocha.
A solution would be to have a variable shared between the tests, as shown above.
With async.waterfall()
this is very possible and I really like it. Is there any way to make it happen in mocha?
Thanks!
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…