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

Add junit.xml to gitignore #3060

Merged
merged 1 commit into from
Oct 14, 2024
Merged

Add junit.xml to gitignore #3060

merged 1 commit into from
Oct 14, 2024

Conversation

dottorblaster
Copy link
Contributor

Description

Right now a junit.xml file gets generated upon npm test, I'm just adding it to the gitignore in order to avoid committing it by mistake.

Copy link
Contributor

@gagandeepb gagandeepb left a comment

Choose a reason for hiding this comment

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

In case you want to consider this alternative: There is also an option that can be set under jest-junit in jest.config.js:

outputDirectory: "/tmp"

Thanks for looking into this. It escaped my attention and should have been handled in a way similar to the mix tests, when I introduced these junit deps.

@dottorblaster
Copy link
Contributor Author

No worries @gagandeepb, I just stumbled upon this right now. Can you do the same for the other tests?

@gagandeepb
Copy link
Contributor

For the other categories of tests: mix tests already have an opt-in flag (WRITE_JUNIT=1) to generate the junit so they do/should not generate junit files by default. Even when opted-in, the junit files for mix tests go to /tmp by default.

@gagandeepb
Copy link
Contributor

For jest tests, the write destination of the junit files can also be customized/overridden, if needed, like: JEST_JUNIT_OUTPUT_DIR=$DESIRED_DIRECTORY npm test

@dottorblaster dottorblaster marked this pull request as ready for review October 10, 2024 15:34
Copy link
Member

@janvhs janvhs left a comment

Choose a reason for hiding this comment

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

LGTM, but lol that's random... isn't that Java normally?

@dottorblaster dottorblaster merged commit a870ceb into main Oct 14, 2024
30 checks passed
@dottorblaster dottorblaster deleted the add-junit-report-gitignore branch October 14, 2024 13:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants