chore: handle non-iterable arrays in test environment
Summary
Fixes #3879. I absolutely hate this solution. Maybe we should figure out a plan which allows us to run the test environment outside of the user sandbox? Would allow us to ditch the babel plugin, which is turning into a monster
Test plan
The test that was never run will now run, and hopefully pass
Doesn't even work :(
Seems I gave up last time: #4630. And the test is purposefully ignored
Maybe we should figure out a plan which allows us to run the test environment outside of the user sandbox?
Totally. We've had other issues related to this and running the runner code in a different environment and then just share its globals with the test environment would probably solve them all.
@aaronabramov tried that in #3880, not sure why he aborted the attempt? Some side channel talk with @cpojer perhaps? I think @mjesun attempted it at some point as well.
I'll write it down for the summit in a few weeks, maybe we can figure out a way forward then
The information I had was that jest-circus will fix all of these, by properly running each thing in the right place.
jest-circus runs inside of the sandbox: https://github.com/facebook/jest/blob/5d2d46f1597e2880aeca4126947d7390cc6ff827/packages/jest-circus/src/legacy-code-todo-rewrite/jestAdapter.ts#L27
This PR is stale because it has been open 1 year with no activity. Remove stale label or comment or this will be closed in 30 days.
This PR was closed because it has been stalled for 30 days with no activity. Please open a new PR if the issue is still relevant, linking to this one.
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.