Closed jacklinton closed 4 years ago
On second thought, maybe this is a Jest problem and not a problem with your package so feel free to close this if you like.
Hey @jacklinton
which version of the jest-runner-groups
and jest
do you use?
Jest is @24.9.0 and jest-runner-groups@1.1.1
On Jun 30, 2020, at 4:01 PM, Eugene Manuilov <notifications@github.com mailto:notifications@github.com > wrote:
Hey @jacklinton
which version of the jest-runner-groups and jest do you use?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.
Do I just need to update to version 2+ of jest-runner-groups?
Yes, try to upgrade to the 2nd version of jest-runner-groups. It should help. Let me know if it doesn't.
It seems to be working great without the extra param on v2. Thanks for the help and the time Eugene!
Awesome! You are welcome, @jacklinton!
I'm not sure when this problem cropped up but I suspect it was after I did some package updates in a project.
Previously working tests were showing a Type Error with the message being the title of this issue.
Jest defaults the value of
extraGlobals
toundefined
and so to resolve the errors I had to add theextraGlobals
parameter to my Jest config and make it equal and empty array.The given line number for the error was:
node_modules/jest-runner-groups/node_modules/jest-runtime/build/index.js:1759:23
where you use the spread operator onthis._config.extraGlobals
, at least in my particular environment which is Node.js V12.15.0 and npm V6.14.5.I guess the desired behavior is that the code should check that config variable's value for
undefined
before trying to spread the variable.Thanks for the great package and great work!