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

Not reporting errors for hooks #124

Closed
iangabrielsanchez opened this issue Aug 4, 2020 · 2 comments
Closed

Not reporting errors for hooks #124

iangabrielsanchez opened this issue Aug 4, 2020 · 2 comments

Comments

@iangabrielsanchez
Copy link

Mocha Test Explorer doesn't report errors in before or beforeEach hooks, stuff like:

     TypeError: Cannot stub non-existent own property storeMessage

It just shows the stop icon and also doesn't show logs

@bellovic
Copy link

Same problem here. If hooks (for example before() fails it is shown only in Mocha explorer log and is not formatted or colored. I would expect error from hooks to be also shown in Mocha Tests tab formatted and colored. It also doesn't update UI with failed style.

@iangabrielsanchez
Copy link
Author

#71 (comment)

Yes, this is by design: the Test Explorer log is used to show the messages from a single test, but the messages from the before/after/setup/teardown steps can't be linked to any test, so they only show up in the "Mocha Tests" output channel (which I introduced specifically to make sure that there is a place where you can find all messages, including those that can't be linked to any test)

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

No branches or pull requests

2 participants