Im trying to test an endpoint for an API integration we are developing. When the request is sent, a webhook get data from an external API, check for any difference with our current DB, saves the new data in our DB, and then sends a message of "ok" if the connection was successful or "error" if there was a problem.
Thing is, this whole process takes around 45 seconds. When I run the test with the insomnia app, everything works just fine. After 45s it validates the status code of the response.
const response1 = await insomnia.send();
expect(response1.status).to.equal(200);
I did have to increase the timeout time in insomnia settings to 60000ms so it doesnt fail for timeout. But when I try to run the test with:
inso run test "test"
The test fails every time after 30 seconds, because of a timeout error. I cant figure out how to increase that timeout limit with the command line.
Things like inso run test "test" -timeout 60000 doesn't seem to work, as it return unknow option.