How to test it with Jest? #36
Unanswered
DonHuskini
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Tried to mock
getCookiewithjest.spyOnhowever it throws an errorCannot spyOn on a primitive value; undefined given. Any idea how to make it work?Also tried importing with
requireand didn't work.Also tried to mock the module and didn't work:
Also tried to to use the
mockResolvedValueOnceto return different values when called and didn't work:Beta Was this translation helpful? Give feedback.
All reactions