cypress-io/cypress-react-unit-test

Cannot spy on window:alert

bahmutov opened this issue · 3 comments

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

yeah, there is no window before the mount, hmm, I added a test to experiment 8b97e63

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