react-hot-toast icon indicating copy to clipboard operation
react-hot-toast copied to clipboard

TypeError: goober.keyframes is not a function

Open Jared-Dahlke opened this issue 2 years ago • 9 comments

react-hot-toast version 1.0.1

I am getting this error when I try to run a test on a file that uses react-hot-toast TypeError: goober.keyframes is not a function

Jared-Dahlke avatar Apr 17 '22 22:04 Jared-Dahlke

Hi! did you have any advance with this?

jose-cabrera avatar May 10 '22 23:05 jose-cabrera

Not a great solution - but a solution none the less:

jest.mock("react-hot-toast", () => ({
  Toaster: () => <>test</>,
}));

ppanthony avatar May 13 '22 13:05 ppanthony

@jdbtc You can downgrade goober manually in yarn.lock || package-lock file to version “2.0.41” but I don't know what side effects you will have

bulatkhayrullin avatar Jul 18 '22 13:07 bulatkhayrullin

Is this issue still present in the 2.3.0?

timolins avatar Jul 18 '22 13:07 timolins

@timolins - yep, I've just upgraded there and re-ran my test suite. y.keyframes is not a function is the error now.

ppanthony avatar Jul 18 '22 14:07 ppanthony

I'm having the same issue

'y.keyframes is not a function'

LeoMacherla avatar Jul 19 '22 14:07 LeoMacherla

Also experiencing this in a webpack bundle. Using yarn, I added to my package.json resolutions field as a workaround:

  "resolutions": {
    "goober": "2.1.9",
    "react-hot-toast": "2.2.0"
  }

nickgros avatar Aug 17 '22 14:08 nickgros

Is there any visibility on this? Not being able to test any pages/components with toasts on prod apps seems like a pretty big deal

marcebdev avatar Nov 16 '22 21:11 marcebdev