You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello, i have come across this issue on my google search to solve an issue i currently have with stubbing the matchMedia function.
I'm have a test case to ensure that my color mode toggle works the way i expect it to. Therefore, i want to (pre)set the dark mode in the test following this blogpost: https://www.cypress.io/blog/2019/12/13/test-your-web-app-in-dark-mode
When executing the test, i get this error message:
Can someone tell me why this fails? Do i need to manually create another stub for no arguments (or the 'prefers-reduced-motion')?
What is the return of the automatically created stub?
Thanks in advance :)
Beta Was this translation helpful? Give feedback.
All reactions