woltapp / react-blurhash

React components for blurhash
590 stars 20 forks source link

Testing components using Blurhash fail #15

Closed nlukovic closed 1 year ago

nlukovic commented 3 years ago

Hello, I'm having issues testing components that use Blurhash in latest Next.JS with typescript.

Currently jest is throwing this error: TypeError: blurhash_1.decode is not a function

It seems like it finds an issue here: https://github.com/woltapp/react-blurhash/blob/458b44880845085066e5640bdc5a24a51f077002/src/BlurhashCanvas.tsx#L32

Thisen commented 1 year ago

Please try out 0.3.0. If that doesn't fix the issue, it's probably inproper configuration of Jest transformation.