Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Assertions run outside of a test should be handled properly in Cypress (not throw internal errors) #3926
When you write assertions outside of a test (failing & passing), Cypress throws an error "cannot read 'id' of undefined"
This is being thrown when attempting to create the logs for a test when the runnable is undefined.
Furthermore, Cypress attempts to iterate over the stylesheets of the current document. Since there is no document, this throws an error that it "cannot read 'stylesheets' of undefined"
When you write assertions outside of a test (failing & passing), Cypress should handles these correctly.
Steps to reproduce: (app code and test code)