michaelleeallen / mocha-junit-reporter

A JUnit XML reporter for mocha.
MIT License
144 stars 153 forks source link

Resolve undefined property lookup on mocha file name formatting #190

Closed zjkipping closed 1 year ago

zjkipping commented 1 year ago

Should help resolve issue: https://github.com/michaelleeallen/mocha-junit-reporter/issues/178

zjkipping commented 1 year ago

@clayreimann @michaelleeallen Any way this can be fast tracked this is ruining a rather large monorepo on my client project.

zjkipping commented 1 year ago

If there is a better default value other than just an empty string, I am happy to replace that. I just don't know the direction this repo would like to go on the topic.

clayreimann commented 1 year ago

@zjkipping Can you explain what happens if we generate a file with the empty string as a name?

zjkipping commented 1 year ago

@zjkipping Can you explain what happens if we generate a file with the empty string as a name?

Currently if you had a file name of foo-[suitName]-bar it would look like foo--bar. Which is why I mentioned we might want something besides the '' default value. I figured someone else might have a better idea about that since I mostly just came to fix the fact it exits as an error currently. possibly just something like 'suitName' could be a fine default or 'undefined'.

clayreimann commented 1 year ago

Would you update the default values to be the bracketed thing that we're, maybe, replacing?

zjkipping commented 1 year ago

@clayreimann Done, let me know if there is anything else I can do with the PR.

zjkipping commented 1 year ago

@clayreimann Looks like the github actions pipelines are failing. Is that a concern for pushing out a 2.2.1 version of the npm package? Not super trying to rush you since I realize this is open source, but I would like to be able to consume this in my client project. If there is anything I can do to support a patch version publish please let me know, happy to help.