我想實現加蓋和緩存作業執行程序。 這將有一個單獨的方法: 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