jest icon indicating copy to clipboard operation
jest copied to clipboard

chore: handle non-iterable arrays in test environment

Open SimenB opened this issue 6 years ago • 6 comments

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

SimenB avatar Feb 26 '19 14:02 SimenB

Doesn't even work :(

Seems I gave up last time: #4630. And the test is purposefully ignored

SimenB avatar Feb 26 '19 16:02 SimenB

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.

rubennorte avatar Feb 28 '19 12:02 rubennorte

@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

SimenB avatar Feb 28 '19 12:02 SimenB

The information I had was that jest-circus will fix all of these, by properly running each thing in the right place.

mjesun avatar Feb 28 '19 14:02 mjesun

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

SimenB avatar Feb 28 '19 14:02 SimenB

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.

github-actions[bot] avatar Sep 08 '22 18:09 github-actions[bot]

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.

github-actions[bot] avatar Oct 08 '22 19:10 github-actions[bot]

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[bot] avatar Nov 08 '22 00:11 github-actions[bot]