Cannot spy on window:alert
bahmutov opened this issue · 3 comments
bahmutov commented
Silently skips alerts https://docs.cypress.io/api/events/catalog-of-events.html#Window-Alert
jennifer-shehane commented
I know we handle alerts differently so this may not work on alert, but also try looking at this recipe to make sure the spy is setup in the right place. https://github.com/cypress-io/cypress-example-recipes/blob/master/examples/stubbing-spying__window/cypress/integration/window-stubbing.spec.js
bahmutov commented
yeah, there is no window before the mount, hmm, I added a test to experiment 8b97e63
bahmutov commented
Version 1.2.0
has been published to NPM. The full release note can be found at cypress-react-unit-test/releases/tag/v1.2.0.
Tip: safely upgrade dependency cypress-react-unit-test in your project using next-update