Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can I mock generated gql functions #152

Open
Mnigos opened this issue Aug 8, 2022 · 0 comments
Open

How can I mock generated gql functions #152

Mnigos opened this issue Aug 8, 2022 · 0 comments

Comments

@Mnigos
Copy link

Mnigos commented Aug 8, 2022

How can I mock generated gql functions

I tried multiple ways to mock gql functions fe.

vi.mock('#build/gql', () => ({
  GqlLogin: async () => ({
    login: {
      access_token: 'access_token',
      refresh_token: 'refresh_token',
    },
  }),
}))

or

vi.mock('GqlLogin', async () => ({
    login: {
      access_token: 'access_token',
      refresh_token: 'refresh_token',
    },
}))

None of these works

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant