vitest-dev / vitest

Next generation testing framework powered by Vite.

Home Page:https://vitest.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Silent option for JUnit reporter

andrii-nastenko opened this issue · comments

Clear and concise description of the problem

When you have silent: true globally - it doesn't seem to have effect on JUnit reporter.
I still get console.logs in my xml reports.

Suggested solution

Would be nice to have 'silent' option for JUnit reporter:

['junit', {outputFile: './test-results/results.xml', silent: true}]

Alternative

No response

Additional context

No response

Validations

It looks like jest-junit has includeConsoleOutput option https://github.com/jest-community/jest-junit/?tab=readme-ov-file#configuration so we can do the same (though it's opt-in in their case).

Btw, assuming you're using Circle CI from the screenshot in the last issue #5603, can you show how it looks on their UI? I'm wondering whether the console output in junit is too bothering in general.

It looks like jest-junit has includeConsoleOutput option https://github.com/jest-community/jest-junit/?tab=readme-ov-file#configuration so we can do the same (though it's opt-in in their case).

Btw, assuming you're using Circle CI from the screenshot in the last issue #5603, can you show how it looks on their UI? I'm wondering whether the console output in junit is too bothering in general.

Hi.
Thank you for fixing previous issue with serialized errors, now it works fine!

Screenshot 2024-05-03 at 11 02 25

And few examples with unwanted console.logs in JUnit report (CircleCI)

Screenshot 2024-05-03 at 12 03 08 Screenshot 2024-05-03 at 12 07 43