jest-community / jest-junit

A Jest reporter that creates compatible junit xml files
Apache License 2.0
483 stars 109 forks source link

Add boolean support for uniqueOutputName option #229

Closed AndreasHae closed 1 year ago

AndreasHae commented 1 year ago

Makes it possible to use the boolean value true for uniqueOutputName, in addition to using the string value "true" to preserve support for environment variables.

Fixes #225

palmerj3 commented 1 year ago

Sorry for the delays on reviewing this. I have been traveling for work and then was ill.

I don't want to merge the PR as-is because it is quite confusing to users. If you expand the PR so that all boolean configuration options can either be string or boolean then I will review & accept.

But I don't want to confuse users by allowing it for only one or two configuration options.

MichaelSp commented 1 year ago

@palmerj3 while I agree, that consistent behaviour would be preferred, I'd also like to highlight, that the documentation is already confusing: Sometimes it says false and sometimes "false" as default. This PR makes it at list in one case irrelevant.

image
palmerj3 commented 1 year ago

I would say either update the docs so they are consistent or update the properties so they can be processed as strings or boolean. I don't want to create more inconsistency.

Closing for now.