-
Notifications
You must be signed in to change notification settings - Fork 115
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
Feature Request: outputNameTemplate #236
Comments
Hey! I like the idea but I'm not sure if it would work in practice. So if multiple jest projects are run then it would get confusing and possibly unpredictable what the filename would be. |
When working with an Nx monorepo you don't call the Jest CLI yourself. Instead you call the Nx CLI and it starts multiple Jest processes at once, one for each of the packages in your monorepo. By default all of these Jest processes share a single Jest base config file, and therefore share a single jest-junit configuration too, meaning their file names can't be hard-coded into their config. That's why I'd like the ability to interpolate the Jest display name into the file name. If you include jest-junit in an Nx monorepo with its default config in the Jest base config then you get Right now I have a jest-junit config that looks something like:
This is pretty good, I end up with I think it would be ideal if a monorepo with a structure like
was able to produce a reports directory like
Which is what interpolating the display name into the file name would give me. Does that help explain my situation? |
Hey thanks that helps a lot. My main point in bringing this up is that most of the people who rely on jest-junit don't have that structure. So if you add the feature make sure to make a note in the docs that this is only for situations where jest projects are run independently. |
Great yeah OK, can do :) |
Hey :)
Would you be open to the idea of an
outputNameTemplate
configuration option?I'd personally be interested in it at least having the
{displayName}
as a possibility for interpolation as it would be very helpful in my Nx Monorepo where there's lots of libraries all executing different jest runs at once but with different display names.I'm open to trying to implement it myself if you greenlight the feature.
Thanks!
The text was updated successfully, but these errors were encountered: