bahmutov / cypress-svelte-unit-test

Unit testing Svelte components in Cypress E2E test runner
162 stars 21 forks source link

Can we mock external requests? #164

Closed nunesmatheus closed 4 years ago

nunesmatheus commented 4 years ago

I have wrote full fledged Cypress tests for a svelte application in the past, but when I run component tests, Cypress does not seem "intercept" the requests and they don't show up on the test logs. I believe that's why standard Cypress external request mocking with cy.route does not work. I am sorry if this is not the correct place to make such a question, but I could not find any information on the Cypress docs. Anyway, what do guys think is the best approach for this? Does the library handle that or we should resort to standard E2E Cypress tests when testing external requests?

bahmutov commented 4 years ago

:tada: This issue has been resolved in version 3.3.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: