Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@fengmk2
Copy link
Member

@fengmk2 fengmk2 commented Oct 1, 2025

Summary by CodeRabbit

  • Breaking Changes

    • Removed support for the mochawesome reporter; the --mochawesome CLI flag is no longer available. Reporter selection now relies on the TEST_REPORTER environment variable.
  • Documentation

    • Updated README to remove the mochawesome reporter option.
  • Chores

    • Removed mochawesome-with-mocha dependency.
    • Relaxed dependency versions to caret ranges for c8, mocha, and typescript.
  • Tests

    • Removed tests related to the --mochawesome flag.

@fengmk2 fengmk2 requested a review from Copilot October 1, 2025 12:38
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 1, 2025

Note

Other AI code review bot(s) detected

CodeRabbit 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.

Walkthrough

Removed 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

Cohort / File(s) Summary of changes
Dependency cleanup
package.json, tools/egg-bin/package.json, pnpm-workspace.yaml
Removed mochawesome-with-mocha. In workspace catalog, changed pinned versions to caret ranges for c8, mocha, typescript; removed mochawesome-with-mocha entry.
CLI test command reporter handling
tools/egg-bin/src/commands/test.ts
Deleted --mochawesome flag and all mochawesome wiring (reporter selection/options, parallel registration). Reporter now sourced only from TEST_REPORTER env; no fallback injection.
Documentation update
tools/egg-bin/README.md
Removed bullet describing --mochawesome reporter option.
Test update
tools/egg-bin/test/commands/test.test.ts
Removed test case exercising --mochawesome; other tests unchanged.

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
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

I hopped through deps with gentle cheer,
Snipped a shiny report from yesteryear.
Flags fell quiet, env now leads,
Mocha runs light, on simpler seeds.
Carrots caret-sweet, version vines climb—
Tests still thump—right on time. 🥕✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
Title Check ✅ Passed The title clearly summarizes the primary change, namely the removal of the mochawesome reporter from the bin code, and follows a concise conventional commit style indicating a refactor.
✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch remove-mochawesome

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

Copilot AI left a 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 --mochawesome flag and its associated logic from the test command
  • Cleaned up dependencies by removing mochawesome-with-mocha from 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

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @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 egg-bin testing utility by completely removing the mochawesome test reporter and its associated dependencies. This change streamlines the codebase, reduces the overall package size, and removes a default reporting mechanism that can now be optionally configured by users if needed. The modifications include updates to package configurations, removal of CLI options, and deletion of related test cases.

Highlights

  • Mochawesome Reporter Removal: The mochawesome-with-mocha dependency and all associated logic for generating mochawesome test reports have been completely removed from the egg-bin testing command.
  • Dependency Clean-up: The package.json, pnpm-lock.yaml, and pnpm-workspace.yaml files have been updated to reflect the removal of mochawesome-with-mocha and its transitive dependencies, resulting in a leaner dependency tree.
  • CLI Flag Deprecation: The --mochawesome CLI flag has been removed from the test command in egg-bin, along with its documentation and corresponding test cases, simplifying the command-line interface.
  • Dependency Version Updates: Minor updates to dependency specifiers (e.g., c8, mocha, typescript) from fixed versions to caret versions have been applied in pnpm-lock.yaml and pnpm-workspace.yaml.
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
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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.

@cloudflare-workers-and-pages
Copy link

Deploying egg with  Cloudflare Pages  Cloudflare Pages

Latest commit: 3554e94
Status:🚫  Build failed.

View logs

@cloudflare-workers-and-pages
Copy link

Deploying egg-v3 with  Cloudflare Pages  Cloudflare Pages

Latest commit: 3554e94
Status:🚫  Build failed.

View logs

@fengmk2 fengmk2 mentioned this pull request Oct 1, 2025
47 tasks
Copy link
Contributor

@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 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
Copy link

codecov bot commented Oct 1, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.06%. Comparing base (deedf32) to head (3554e94).
⚠️ Report is 2 commits behind head on next.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@fengmk2 fengmk2 changed the title refactor(bin): remove mochawesome report by default refactor(bin): remove mochawesome reporter Oct 1, 2025
@fengmk2 fengmk2 merged commit d89d165 into next Oct 1, 2025
28 of 34 checks passed
@fengmk2 fengmk2 deleted the remove-mochawesome branch October 1, 2025 13:17
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.

2 participants