目前我想了解BDD DSL如何在摩卡工作,我卡住了。我想要这种方法,并希望应用此。摩卡如何确定嵌套级别?
例如,下面的测试:
describe('foo', function(){
describe('bar', function(){
it('should be something')
});
});
将产生输出:
foo
bar
- should be something
0 passing (4ms)
1 pending
问题:如何确定在嵌套块全局函数describe
的调用为嵌套?我查看了源代码,但现在无法处理主要想法。