Skip to content

How to mock useFetch responses? #889

@juw177

Description

@juw177

I understand this may not be a storybook nuxt question but the msw addon (https://github.com/mswjs/msw-storybook-addon) only seems to work for client side requests. When useFetch is called at the top setup block the addon is not able to intercept it. What is the recommended approach to mocking the api call?

Thank you, any advice appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions