-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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-jasmine2] Rewrite QueueRunner
.
#3187
[jest-jasmine2] Rewrite QueueRunner
.
#3187
Conversation
Tests are failing because
|
Manually.
…tch-1 Update snapshot.
Tests are failing due to stack trace differences in Circle, which tests on |
Oh, in this case you should discard usage of snapshot for stack trace and use regular matchers instead. |
* [jest-jasmine2] Rewrite `QueueRunner`. * Make `FakeTimer` test stack agnostic. * Update snapshot. Manually. * Fix `FakeTimer`. * Lint. * Do not use async. * Revert "Merge pull request jestjs#1 from wtgtybhertgeghgtwtg/wtgtybhertgeghgtwtg-patch-1" This reverts commit 9424111, reversing changes made to ea0bb8a.
* [jest-jasmine2] Rewrite `QueueRunner`. * Make `FakeTimer` test stack agnostic. * Update snapshot. Manually. * Fix `FakeTimer`. * Lint. * Do not use async. * Revert "Merge pull request jestjs#1 from wtgtybhertgeghgtwtg/wtgtybhertgeghgtwtg-patch-1" This reverts commit 9424111, reversing changes made to ea0bb8a.
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. |
Summary
Rewrites
QueueRunner
(nowqueueRunner
) and pulls it out ofjasmine
.One of the problems with the current implementation of
QueueRunner
is that it createsvery deep recursive stacks very quickly. It tries to mitigate that by spinning off into a timeout every 20 iterations or so, but that's an ugly and suboptimal solution. With this rewrite,
queueRunner
mapsqueueableFns
to promises and resolves them sequentially, so the stack never gets very deep. Performance is not noticeably affected.Test plan
Tests have been written for
queueRunner.
A test injest-util
has been changed, as it required the stack to be a certain way.