Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors occurring outside tests no longer reported correctly #85

Closed
unikitty37 opened this issue Mar 17, 2021 · 5 comments
Closed

Errors occurring outside tests no longer reported correctly #85

unikitty37 opened this issue Mar 17, 2021 · 5 comments
Labels
bug Something isn't working

Comments

@unikitty37
Copy link

Since upgrading to 3.0.0, error reporting seems to be broken for errors occurring outside tests. (This also applies to 3.0.1).

Given the following test file:

describe('bug', () => {
  cy.log('not in a test')
})

Version 2.4.0 reports it correctly:

image

But versions 3.0.0 and 3.0.1 hit an error in LogCollectSimpleControl.js:

image

TypeError: Cannot read property 'relativeFile' of undefined

Because this error occurred during a `after each` hook we are skipping all of the remaining tests.
    at LogCollectSimpleControl.sendLogsToPrinter (LogCollectSimpleControl.js:25)
    at Context.eval (LogCollectSimpleControl.js:79)
logError @ cypress_runner.js:197884
@archfz archfz added the bug Something isn't working label Mar 17, 2021
@archfz
Copy link
Owner

archfz commented Mar 17, 2021

On a note I believe executing command of cypress on that level is not correct right?

@unikitty37
Copy link
Author

Right — but the Cypress error message is a lot more helpful for finding what you did wrong 😁

@archfz
Copy link
Owner

archfz commented Mar 27, 2021

Released in 3.0.2

@archfz archfz closed this as completed Mar 27, 2021
@jmoses
Copy link
Contributor

jmoses commented Apr 5, 2021

Is a fix for this really released? I looked in the changelog between 3.0.1 and 3.0.2 and the only addition was a test case that would express the error, but it's doesn't look like it's being run from test/test.js anywhere as part of the suite.

@archfz
Copy link
Owner

archfz commented Apr 5, 2021

Apparently I stashed at some point some of the changes. My mistake on that release. Fixed release in 3.0.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants