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

Array.prototype[Symbol.iterator] = null stalls the process #3879

Closed
aaronabramov opened this issue Jun 22, 2017 · 9 comments
Closed

Array.prototype[Symbol.iterator] = null stalls the process #3879

aaronabramov opened this issue Jun 22, 2017 · 9 comments
Labels

Comments

@aaronabramov
Copy link
Contributor

Array.prototype[Symbol.iterator] = null;
String.prototype[Symbol.iterator] = null;

test('test', () => {});

will never finish running until interrupted.

screen shot 2017-06-21 at 8 02 56 pm

@thymikee
Copy link
Collaborator

Fixed in #3880

@SimenB
Copy link
Member

SimenB commented Feb 26, 2019

This is broken since the test added was never run (it should be name .test.js, not -test.js). It was broken in #4016 and never discovered (jest-circus is broken in the same way)

@SimenB SimenB reopened this Feb 26, 2019
@SimenB
Copy link
Member

SimenB commented Feb 26, 2019

Well, It's broken in a different way now:

    TypeError: [object Array] is not iterable
        at Function.race (<anonymous>)

      at mapper (packages/jest-jasmine2/build/queue_runner.js:54:23)

the error varies across node versions

@rubennorte
Copy link
Contributor

Well, wouldn't any modification on the built-in objects potentially affect the runner code?

@SimenB
Copy link
Member

SimenB commented Feb 28, 2019

Yeah, but it really shouldn't - we should be able to isolate our own code from user code. That's a bigger issue, though. Not sure if it's possible to not run inside of the user context, and how that would impact leaking state between tests

@SimenB
Copy link
Member

SimenB commented Feb 28, 2019

And now it at least throws an error instead of hanging the process, so I guess that's better tan the issue originally reported here

@github-actions
Copy link

This issue is stale because it has been open for 1 year with no activity. Remove stale label or comment or this will be closed in 30 days.

@github-actions github-actions bot added the Stale label Feb 26, 2022
@github-actions
Copy link

This issue was closed because it has been stalled for 7 days with no activity. Please open a new issue if the issue is still relevant, linking to this one.

@github-actions
Copy link

This issue 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 Apr 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants