Simen Bekkhus

Results 1232 comments of Simen Bekkhus

Yeah, we don't support `worker_threads` (or `child_process`). Sorta related to #5274, but that issue is just about coverage, which would be solved at the same time. I haven't spent much...

Not sure about this. It would mean people supporting `>=20` wouldn't be able to use Jest. Same technically applies to `>=18` already as we've dropped 19, so maybe not a...

You're trying to run `vm` inside of `vm`, which is not _really_ supported. Why do you need to do that?

>inject some js files globally before all tests runs, especially some class. Is there any better approach to do this. https://jestjs.io/docs/configuration#setupfiles-array should do what you want. >Also what do you...

Jest uses common js, so I don't think we can do this 🤔

https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm#javascript_types >[Primitive types](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#primitive_values), except `symbol`. Great... 😅 Not sure how we can deal with this properly 🤔

I was not aware that we made `setTimeout` and friends into spies - I'm not sure how that will work once we start using Lolex (#5165). So for now I'd...

FWIW I've set up the Lolex branch to spy on the methods, so no longer breaking in that regard

My current thinking is that we should remove the mocks from the timing functions when using fake timers. Easy enough for people to do `jest.spyOn(global, 'setTimeout')` if they want.

Modern timers (available jest 26, default jest 27) are not affected by this. PR welcome documenting this for legacy timers, tho