-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
refactor(bin): remove mochawesome reporter #5575
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
Conversation
|
Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. WalkthroughRemoved mochawesome integration across repo: dependencies deleted, CLI flag and reporter wiring removed, tests and docs updated accordingly. Workspace catalog switched specific versions to caret ranges for c8, mocha, and typescript. Reporter selection in test command now relies solely on TEST_REPORTER environment variable. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor Dev as Developer
participant EB as egg-bin Test Command
participant Env as Environment
participant Mocha as Mocha Runner
Dev->>EB: run "egg-bin test"
EB->>Env: read TEST_REPORTER
alt Reporter set
EB->>Mocha: invoke with --reporter=$TEST_REPORTER
else Reporter not set
EB->>Mocha: invoke with default Mocha reporter
end
Mocha-->>Dev: test results
note over EB,Mocha: Mochawesome-specific flags/registration removed
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR removes the mochawesome report functionality from the egg-bin test command by default. The change simplifies the test command by removing the automatic mochawesome HTML report generation that was previously enabled by default.
Key changes:
- Removed the
--mochawesomeflag and its associated logic from the test command - Cleaned up dependencies by removing
mochawesome-with-mochafrom package.json files - Updated version constraints for some catalog dependencies to use caret ranges
Reviewed Changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tools/egg-bin/src/commands/test.ts | Removed mochawesome flag definition and reporter logic |
| tools/egg-bin/test/commands/test.test.ts | Removed test case for mochawesome functionality |
| tools/egg-bin/package.json | Removed mochawesome-with-mocha dependency |
| tools/egg-bin/README.md | Removed documentation for --mochawesome flag |
| pnpm-workspace.yaml | Removed mochawesome-with-mocha from catalog and updated version constraints |
| package.json | Removed mochawesome-with-mocha dependency |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
Summary of ChangesHello @fengmk2, 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 refactors the Highlights
Using Gemini Code AssistThe 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
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 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
|
There was a problem hiding this 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 removes the mochawesome reporter as a default option, which simplifies the testing configuration. The changes are consistent across package.json, lock files, documentation, and source code. I've also noticed the dependency versions for c8, mocha, and typescript have been updated to use caret ranges, which is a good practice for dependency management. I have one suggestion to improve the reporter configuration flexibility in tools/egg-bin/src/commands/test.ts.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## next #5575 +/- ##
=======================================
Coverage 81.06% 81.06%
=======================================
Files 209 209
Lines 5988 5988
Branches 876 876
=======================================
Hits 4854 4854
Misses 1060 1060
Partials 74 74 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Summary by CodeRabbit
Breaking Changes
Documentation
Chores
Tests