超时-在jest.setTimeout.Error指定的5000ms超时内未调用异步回调:

时间:2019-12-24 21:02:30

标签: javascript typescript

我正在docker-compose上进行测试。我遍历了代码的每个部分并进行了测试,并且不断收到这个奇怪的错误Timeout - Async callback was not invoked within the 10000ms timeout specified by jest.setTimeout.Error:,这是我的测试的样子

describe("Transactions", () => {
    test("it should only show transactions for accounts that the user has permissions for", async () => {
      //jest.setTimeout(10000);
      const account = "0071326981";
      const accountInfo = mockTransactions(account);
      const authRequest = mockTransactionQuery(account);
      const token = await createHeadlessSession({ ...user, ...mockTransactionsSession(account, true) }, env.service_secret);

      mockGetAccount(account, accountInfo);
      await request
        .get("/api/v1/transactions")
        .set("Authorization", `${env.auth_scheme} ${token}`)
        .query(authRequest)
        .expect(OK);
    });

0 个答案:

没有答案