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

Allow <rootDir> placeholder to be used in the output option. #65

Merged
merged 2 commits into from
Sep 29, 2018

Conversation

IIFE
Copy link
Contributor

@IIFE IIFE commented Sep 29, 2018

Resolves #49

Changes to allow <rootDir> placeholder to be used in the output option. Useful when jest-junit is used in a monorepo environment, where you want each project to have its own test result. In a monorepo jest rootDir will be the path of whatever the project under test is.

Had to add jest-config as a dependency in order to access the same function that jest uses to replace the <rootDir> placeholder. Thought this would be a better option than writing a custom replacer, as it keeps it consistent with jest.

Thanks

Copy link
Member

@SimenB SimenB left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great, thank you! Just a small suggestion for using another matcher, then this should be ready to go!

Do you think we should mention it in the README, or do people assume it works (which they should, tbh)

__tests__/getOptions.test.js Outdated Show resolved Hide resolved
@IIFE
Copy link
Contributor Author

IIFE commented Sep 29, 2018

Is there anything else that I should do at this point, or do I just wait for the merge to happen?

Thanks.

@SimenB
Copy link
Member

SimenB commented Sep 29, 2018

@palmerj3 should take a look whenever he finds the time and do the merge and release 🙂

@palmerj3
Copy link
Collaborator

Looks great!

@palmerj3 palmerj3 merged commit fd25452 into jest-community:master Sep 29, 2018
@IIFE
Copy link
Contributor Author

IIFE commented Sep 29, 2018

Thanks all, appreciate it.

@palmerj3
Copy link
Collaborator

Just published v5.2.0

@IIFE
Copy link
Contributor Author

IIFE commented Sep 29, 2018

Just published v5.2.0

Awesome. Just downloaded latest package and all works fine in my project.

Thanks guys.

@IIFE IIFE deleted the rootDir branch September 29, 2018 19:21
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

Successfully merging this pull request may close these issues.

None yet

3 participants