Closed sarabs3 closed 8 months ago
Which node version are you using? Older node versions don't expose TextDecoder as a global. Try upgrading node if it's below version 12. Otherwise it might be related to how your testing environment is configured.
If you're using Jest check out this solution to define TextDecoder and TextEncoder https://github.com/mswjs/msw/issues/1796#issuecomment-1782351156
Hey there, yes this is a Jest issue. We actually fixed it in our code too: https://github.com/vercel/storage/blob/main/packages/blob/jest/setup.js
Good luck!
I am using blob storage for the first time and after implementing it in the code, while running the tests I am getting this error. ReferenceError: TextDecoder is not defined
This is my code
Error in jest