How can I test fetch hook of NUXT on client side?

Viewed 35

How can I test fetch hook of NUXT on client side which is using $fetch in it? I can't find any documentation and honestly Nuxt sucks.

The only idea I have is to use

global.$fetch = jest.fn().mockResolvedValue({...

but it doesn't seem to work

0 Answers
Related