Conversation
✅ Deploy Preview for rstest-dev ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Pull Request Overview
This PR adds a JUnit XML reporter to the RSTest testing framework, enabling test results to be output in JUnit XML format for CI/CD integration.
- Added a new JUnitReporter class that generates JUnit XML format reports
- Updated documentation in both English and Chinese to describe the new JUnit reporter
- Added comprehensive test coverage for the JUnit reporter functionality
Reviewed Changes
Copilot reviewed 10 out of 11 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/core/src/reporter/junit.ts | Main implementation of the JUnit reporter with XML generation logic |
| packages/core/src/core/rstest.ts | Registration of the new JUnit reporter in the reporter registry |
| packages/core/src/utils/error.ts | Refactored error handling to export formatStack function for reuse |
| packages/core/tests/reporter/junit.test.ts | Unit tests for the JUnit reporter functionality |
| e2e/reporter/junit.test.ts | End-to-end test for JUnit reporter CLI integration |
| e2e/reporter/fixtures/junit.test.ts | Test fixture file for e2e testing |
| packages/core/package.json | Added strip-ansi dependency |
| packages/core/LICENSE.md | Added license information for strip-ansi |
| website/docs/en/config/test/reporters.mdx | English documentation for JUnit reporter |
| website/docs/zh/config/test/reporters.mdx | Chinese documentation for JUnit reporter |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| import { defineConfig } from '@rstest/core'; | ||
|
|
||
| export default defineConfig({ | ||
| reporters: [['junit', { outputPath: './junit.xml' }]] |
There was a problem hiding this comment.
The configuration example is missing a trailing comma after the array element. This should be reporters: [['junit', { outputPath: './junit.xml' }]], to match proper JavaScript/TypeScript syntax and be consistent with other examples in the file.
| reporters: [['junit', { outputPath: './junit.xml' }]] | |
| reporters: [['junit', { outputPath: './junit.xml' }]], |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
前端为什么也可以输入出 Junit 的?这很有趣啊。 |
Summary
The JUnit reporter supports outputting test reports in JUnit XML format, making it easy to integrate with CI/CD.
Related Links
Checklist