You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My node version is 20, also. I don't understand why something doesn't recognize that Set() has new methods. I realize that Set() doesn't have new methods until Node 22. So I'm guessing this somehow is tying back to Babel. How can I get Babel to correctly polyfill these methods for Jest?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I've got this project which started life as JS, was then converted to TS. I'm trying to update one file to use new methods that are are on the Set object.
I have no problem building. The compiled code runs as expected.
But when I run my unit tests, I get an error: "TypeError: set.union is not a function".
(My node version is 20).
This is my jest.config.js
And this is my tsconfig
And this is my babel config
My node version is 20, also.
I don't understand why something doesn't recognize thatI realize thatSet()
has new methods.Set()
doesn't have new methods until Node 22. So I'm guessing this somehow is tying back to Babel. How can I get Babel to correctly polyfill these methods for Jest?Beta Was this translation helpful? Give feedback.
All reactions