我想实现加盖和缓存作业执行程序。 这将有一个单独的方法: public class CappedBufferedExecutor {
public CappedBufferedExecutor(int bufferCapping, int fillTimeInMillisec);
public Task<bool> EnqueueAsync(string val);
}
我使用Mocha和Chai HTTP测试Rest API。我已经写的所有的使用回调测试的情况下,现在我想用异步/ AWAIT因为很多更具可读性谭回调和承诺,所以我得到这个代码: let sport1, sport2;
let user1, user2;
let user1Token;
let event1, event2, event3, event4;
beforeEach(async