摩卡咖啡不允许里面有钩子吗
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
跑,但是
之前
就在里面
它
不运行。