Skip to content

How to use timeout inside spec handler #355

Answered by ASaiAnudeep
JyotiPMallick asked this question in Q&A
Discussion options

You must be logged in to vote

Try using withRequestTimeout

addSpecHandler("login", ({ spec }) => {
  spec.withRequestTimeout(10000)
  spec.post(`${LOGIN_URL}`);
  spec.withJson({
    mobileNo: "9876543211",
    referralCode: "string",
  });
  spec.expectStatus(200);
  spec.stores("BEARER_TOKEN", "jwt");
});

Make sure to increase the test runners timeout as well

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by JyotiPMallick
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants