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

'includeFailureMsg': true & 'includeConsoleLog': true do not show the errors & logs in the HTML report #51

Closed
annayap opened this issue Sep 24, 2018 · 5 comments
Assignees

Comments

@annayap
Copy link

annayap commented Sep 24, 2018

I've added the following configuration in my jest.config.js file

image

The report is generated - however, neither the console logs or the failure message are displayed:
image

In the documentation, one of your screenshots has the error displayed.

image

How can this be done? What did I miss?

Thanks!

@annayap annayap changed the title 'includeFailureMsg': true & 'includeConsoleLog': true do not show the errors & logs in the report 'includeFailureMsg': true & 'includeConsoleLog': true do not show the errors & logs in the HTML report Sep 24, 2018
@Hargne Hargne self-assigned this Sep 24, 2018
@Hargne
Copy link
Owner

Hargne commented Sep 24, 2018

First and foremost: thanks for such an awesome and detailed issue report! 🥇 Hats off!

It looks like it says "includeFaillureMsg" (with double Ls) in the configuration that you posted - it should be a single L in failure!

Get back to me if this solves the issue!

@annayap
Copy link
Author

annayap commented Sep 24, 2018

Wooooops!!!

Yes, it worked!
image

How do I make the console logs appear in the HTML report though? <Not sure if there's a detailed step by step in the documentation.. can't find it..>

Thanks so much!

@Hargne
Copy link
Owner

Hargne commented Sep 25, 2018

To have console logs outputted into the report, you would use the includeConsoleLog: true setting.
Please note though that this will gather all logs from each test suite and output it below each suite (not below each test).

Also note that only console logs made in the actual tests, not the tested code, will be printed. I have had questions regarding how to trigger console logs from the tested code previously, but this is unfortunately not possible with the current state of Jest.

@annayap
Copy link
Author

annayap commented Sep 25, 2018

Can you give an html report example of a simple jest test that has console logs in it and with includeConsoleLog: true ?

'Cause when I set includeConsoleLog to true, nothing changes in the report. I don't see any console logs..

Thanks again so much!

@Hargne
Copy link
Owner

Hargne commented Mar 7, 2019

Hi!
I apologize for the extremely slow response!
This might be related to #61 where having verbose: true in the jest config seems to be causing the console.logs to disappear from the Jest output.

I will close this issue and refer to #61 for continued discussion.
However, if you feel that this is a problem regardless of that issue, feel free to open this again

@Hargne Hargne closed this as completed Mar 7, 2019
ptabor pushed a commit to ptabor/jest-html-reporter that referenced this issue Sep 1, 2023
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