Skip to content

How to handle useShopQuery in e2e tests running within github actions #1666

Answered by jplhomer
nattyg93 asked this question in Help
Discussion options

You must be logged in to vote

Hi! We actually have E2E tests running on GH Actions which hit useShopQuery just fine: https://github.com/Shopify/hydrogen/tree/1103fb575e51d5948c6bd4885bcd911be1f8bf7e/templates/demo-store/tests/e2e (deleted from our main branch but we will soon be adding them back).

I can see the desire to mock them, though. I wonder if there's an opportunity to use an HTTP-level mocking library, something like https://github.com/nock/nock. I have not tried, though!

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@nattyg93
Comment options

Answer selected by nattyg93
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants