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
Basically I was testing some component that uses toast exported from @redwoodjs/web/toast
While on dev server, everything works as expected. but when testing the componente, specifically a function that later calls toast.error(...), I get the next error from jest:
TypeError: _toast.toast.error is not a function
75 | },
76 | onError: (error) => {
> 77 | toast.error(error.message)
| ^
78 | },
79 | }
80 | )
Then a console.log shows that toast from import { toast } from '@redwoodjs/web/toast' has the next value:
What's not working?
Basically I was testing some component that uses
toast
exported from@redwoodjs/web/toast
While on dev server, everything works as expected. but when testing the componente, specifically a function that later calls
toast.error(...)
, I get the next error from jest:Then a
console.log
shows thattoast
fromimport { toast } from '@redwoodjs/web/toast'
has the next value:When the value should be the inner "toast: [Getter]"
Only happens while testing
How do we reproduce the bug?
Just test some function in a react component that uses toaster from
react-hot-toast
while importing it from@redwoodjs/web/toast
What's your environment? (If it applies)
Are you interested in working on this?
The text was updated successfully, but these errors were encountered: