Open roffelund opened 1 year ago
Thanks for the reproduction! I saw this happening, but didn’t had time to figure out what was the exact cause. Huge objects were around, so it was difficult to reason about.
Seems like serialization fails somewhere in the threads worker, because all is smooth with workerThreads: false
.
By the way, could you mention in the title that the issue is specifically related with workerThreads
, not just workers in general.
Thanks for the reproduction! I saw this happening, but didn’t had time to figure out what was the exact cause. Huge objects were around, so it was difficult to reason about.
Seems like serialization fails somewhere in the threads worker, because all is smooth with
workerThreads: false
.
Took some debugging to narrow it down. As you say workerThreads: false all is smooth sailing.
Hey, I tried to fix this issue here, would appreciate any feedback/suggestions https://github.com/jestjs/jest/pull/14436/
Version
29.6.2
Steps to reproduce
Expected behavior
I expected the test to show that the expected and received do not match.
Actual behavior
Test stops running with exception
Additional context
This only happens when running with workers. Turning off workers expected behaviour works fine.
Environment