Closed
Description
openedon Jan 30, 2023
🚀 Feature Proposal
Currently, when using the done
callback the test will fail with a timeout if done
is never called. I believe that this test failure is not explicit enough. We should instead also mention that this timeout occurred because the done
callback was never called.
Motivation
I believe it should be obvious why a test is failing. I therefore believe there is added value in letting the user know that a test is failing because the done
callback was never called.
Example
Current behaviour:
test("1+1 equals 2", (done) => {
expect(1 + 1).toBe(2);
});
>>>
Exceeded timeout of 5000 ms for a test.
Use jest.setTimeout(newTimeout) to increase the timeout value, if this is a long-running test
Proposed behaviour:
test("1+1 equals 2", (done) => {
expect(1 + 1).toBe(2);
});
>>>
Exceeded timeout of 5000 ms while waiting for done to be called.
Use jest.setTimeout(newTimeout) to increase the timeout value, if this is a long-running test
Pitch
See motivation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment