Skip to content
This repository has been archived by the owner on Jun 11, 2022. It is now read-only.

refactor - component is not supposed to need urql mocks, but since it's #50

Open
github-actions bot opened this issue Jun 4, 2022 · 0 comments
Open
Labels
todo Auto-generated from TODO comments

Comments

@github-actions
Copy link

github-actions bot commented Jun 4, 2022

a full mount, it has to provide $urql for the child 😢

// TODO: refactor - component is not supposed to need urql mocks, but since it's

  ],
})

const querySpy = vi.fn(() => fromValue({}))
const mutationSpy = vi.fn(() => never)

const wrapperFactory = () =>
  mount(ProjectView, {
    global: { plugins: [Quasar] },
    props: {
      project,
    },
    provide: {
      // TODO: refactor - component is not supposed to need urql mocks, but since it's
      // a full mount, it has to provide $urql for the <add-member /> child 😢
      $urql: ref({
        executeQuery: querySpy,
        executeMutation: mutationSpy,
        executeSubscription: vi.fn(() => never),
      }),
    },
  })

const projectNameSelector = '[data-testid="project-name"]'
@github-actions github-actions bot added the todo Auto-generated from TODO comments label Jun 4, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
todo Auto-generated from TODO comments
Projects
None yet
Development

No branches or pull requests

0 participants