Skip to content

Conversation

@AndrianBdn
Copy link
Contributor

No description provided.

@AndrianBdn AndrianBdn added the publish Publish to NPM label Sep 23, 2025
@AndrianBdn AndrianBdn requested a review from hi-rai September 23, 2025 15:29
@gemini-code-assist
Copy link

Summary of Changes

Hello @AndrianBdn, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request enhances the JUnit XML parsing utility by addressing an edge case where empty or tags could lead to parsing issues. By updating the parsing schema and refining the content extraction logic, the system now gracefully handles such tags, ensuring that test results are processed accurately even when XML producers emit these empty elements. A new test fixture and corresponding test case validate this fix, and the package version has been bumped.

Highlights

  • Robust JUnit XML Parsing: The parser now correctly handles empty and tags in JUnit XML files, which the underlying xml2js library might interpret as empty strings.
  • Schema Update for Empty Tags: The Zod schema for 'system-out' and 'system-err' within the testCaseSchema has been updated to accept both object and string forms, accommodating different parsing outcomes for empty tags.
  • Improved Attachment Extraction: The logic for extracting attachments from system output content has been refined to safely process content that might be a plain string (including empty strings) rather than an object, preventing potential errors.
  • New Test Case and Fixture: A dedicated test case and a new JUnit XML fixture ('empty-system-err.xml') have been added to validate the correct parsing behavior when encountering empty system tags.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request effectively addresses an issue with parsing JUnit XML files that contain empty system tags like <system-err/>. The changes to the Zod schemas in junitXmlParser.ts are robust, allowing for empty tags to be parsed as strings without causing validation errors. The addition of a new test case and a corresponding fixture is excellent, ensuring this fix is well-tested and prevents future regressions. The code quality is high. I have one minor suggestion to refactor a loop into a more functional style for improved readability.

@AndrianBdn AndrianBdn force-pushed the andrian/empty-system-tags-fix-202509231526 branch from 023e63e to 4249cfd Compare September 23, 2025 15:41
@AndrianBdn AndrianBdn merged commit ca013f8 into main Sep 23, 2025
2 checks passed
@AndrianBdn AndrianBdn deleted the andrian/empty-system-tags-fix-202509231526 branch September 23, 2025 15:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

publish Publish to NPM

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants