摩卡咖啡是否不允许在it
测试用例中插入钩子?
我尝试了以下操作,但似乎从未执行:
describe('Array', () => {
before(async () => {
// do some async stuff before any test cases in this suite run
// THIS RUNS OK
});
it('should blah', async () => {
before(async () => {
// do some async stuff just before this test case
// THIS NEVER RUNS!!!!!!!!!!!!!!!!!!!!!!
});
// blah
);
});
before
中的describe
运行,但是before
内的it
无法运行。