【发布时间】:2013-12-14 14:02:27
【问题描述】:
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();
});
});
上述内容目前不适用于 mocha。
一种解决方案是在测试之间共享一个变量,如上所示。
有了async.waterfall(),这是很有可能的,我真的很喜欢。有什么办法可以在 mocha 中实现它?
谢谢!
【问题讨论】:
标签: javascript testing mocha.js