Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[jest-circus] fix stack frame for test timeout #6303

Merged
merged 3 commits into from
May 27, 2018

Conversation

SimenB
Copy link
Member

@SimenB SimenB commented May 26, 2018

Summary

By not providing a new error, some later code will make sure to append the stack from asyncError.

We should probably still fix #6277, fwiw, but this allows us to enable the failures test.

Test plan

Green CI.

Copy link
Contributor

@aaronabramov aaronabramov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh.. that was easy! :)


at __tests__/async_failures.test.js:24:10

● timeout

Timeout - Async callback was not invoked within the 5ms timeout specified by jest.setTimeout.
thrown: \\"Exceeded timeout of 5ms for a test.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's probably going to be different from Jasmine :(

@SimenB
Copy link
Member Author

SimenB commented May 27, 2018

oh.. that was easy! :)

Yeah, it worked out alright when it just checks for missing traces at a later stage

@SimenB SimenB merged commit f527647 into jestjs:master May 27, 2018
@SimenB SimenB deleted the circus-failure-timeout branch May 27, 2018 00:28
);
`Exceeded timeout of ${timeout}ms for a ${
isHook ? 'hook' : 'test'
}.\nUse jest.setTimeout(newTimeout) to increase the timeout value, if this is a long-running test.`;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

more timeouts please!

@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

jest-circus doesn't fail tests on timeouts set by jest.setTimeout
4 participants