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

Address error in tap reporter when originalError is undefined #3325

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

evmiguel
Copy link

This is a follow up from the discussion in #3322. The tap reporter was failing when ava timed out because of

originalError.name = name; // Restore the original name.

being undefined.

The suggestion was to use optional chaining on the left side of the assignment, but I ran into the tests failing, so I wrapped the assignment in an if condition.

@novemberborn
Copy link
Member

The suggestion was to use optional chaining on the left side of the assignment, but I ran into the tests failing, so I wrapped the assignment in an if condition.

Yes that's my bad, you can't use optional chaining on the left hand side in an assignment.

@novemberborn novemberborn marked this pull request as ready for review May 5, 2024 19:56
@novemberborn novemberborn marked this pull request as draft May 5, 2024 19:57
@novemberborn
Copy link
Member

@evmiguel looking at the rest of the function, the originalError.stack assignment would also fail.

Looking at how dumpError is called, I don't see how it would be called with an undefined value. Could you provide a reproduction of the error?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants