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
I run into a problem in migrating to vitest from jest. I have to mock an external API module but this module also includes Error classes. In order properly be able to use instanceof Error I made this construct in jest.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi,
I run into a problem in migrating to vitest from jest. I have to mock an external API module but this module also includes Error classes. In order properly be able to use
instanceof Error
I made this construct in jest.A similar approach in vitest does not work for me and nothing gets mocked.
I can't find a solution but making a fake module only for the error class and I just tried to avoid it.
Beta Was this translation helpful? Give feedback.
All reactions