Conversation
Summary of ChangesHello @hyoban, 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 focuses on a targeted cleanup of test files by removing redundant Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. 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.
Code Review
This pull request removes the now-redundant __esModule: true property from vi.mock calls across numerous test files. This is a good cleanup that modernizes the test suite's mocking strategy, as modern versions of Vitest handle ES module mocking automatically. The changes are consistent and correct across all modified files. I have reviewed the changes and they look good to me.
There was a problem hiding this comment.
Pull request overview
This PR removes the unnecessary __esModule: true property from Vitest mock return objects across test files. The __esModule property was historically used for Babel/TypeScript interop but is not required in modern Vitest, which handles ES module mocking natively.
Key changes:
- Removed
__esModule: truefrom approximately 90+ mock definitions across test files - No functional changes to test behavior or logic
Reviewed changes
Copilot reviewed 79 out of 79 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| web/context/modal-context.test.tsx | Removed __esModule from trigger events modal mock |
| web/app/components/workflow-app/components/workflow-header/index.spec.tsx | Removed __esModule from app store, workflow header, and workflow service mocks |
| web/app/components/workflow-app/components/workflow-header/features-trigger.spec.tsx | Removed __esModule from 11 different mocks including workflow hooks, stores, and service mocks |
| web/app/components/workflow-app/components/workflow-header/chat-variable-trigger.spec.tsx | Removed __esModule from workflow hooks and chat variable button mocks |
| web/app/components/tools/marketplace/index.spec.tsx | Removed __esModule from marketplace list and utility function mocks |
| web/app/components/share/text-generation/run-once/index.spec.tsx | Removed __esModule from breakpoints, code editor, and image uploader mocks |
| web/app/components/share/text-generation/run-batch/index.spec.tsx | Removed __esModule from breakpoints mock |
| web/app/components/goto-anything/index.spec.tsx | Removed __esModule from actions mock |
| web/app/components/explore/sidebar/index.spec.tsx | Removed __esModule from breakpoints mock |
| web/app/components/explore/installed-app/index.spec.tsx | Removed __esModule from text generation and chat component mocks |
| web/app/components/explore/index.spec.tsx | Removed __esModule from breakpoints and document title hooks |
| web/app/components/explore/create-app-modal/index.spec.tsx | Removed __esModule from emoji-mart data mock |
| web/app/components/explore/app-list/index.spec.tsx | Removed __esModule from create app modal and DSL confirm modal mocks |
| web/app/components/datasets/documents/detail/completed/segment-card/index.spec.tsx | Removed __esModule from status item, image list, and markdown component mocks |
| web/app/components/datasets/documents/create-from-pipeline/processing/index.spec.tsx | Removed __esModule from embedding process mock |
| web/app/components/datasets/documents/create-from-pipeline/processing/embedding-process/rule-detail.spec.tsx | Removed __esModule from Next.js image mock |
| web/app/components/datasets/documents/create-from-pipeline/preview/chunk-preview.spec.tsx | Removed __esModule from document picker mock |
| web/app/components/datasets/documents/create-from-pipeline/data-source/online-drive/index.spec.tsx | Removed __esModule from toast component mock |
| web/app/components/datasets/documents/create-from-pipeline/data-source/online-documents/index.spec.tsx | Removed __esModule from toast component mock |
| web/app/components/datasets/create/step-three/index.spec.tsx | Removed __esModule from embedding process and breakpoints mocks |
| web/app/components/datasets/create/index.spec.tsx | Removed __esModule from step-one, step-two, and step-three component mocks |
| web/app/components/datasets/common/retrieval-method-config/index.spec.tsx | Removed __esModule from retrieval param config mock |
| web/app/components/custom/custom-page/index.spec.tsx | Removed __esModule from custom web app brand mock |
| web/app/components/billing/vector-space-full/index.spec.tsx | Removed __esModule from upgrade button mock |
| web/app/components/billing/trigger-events-limit-modal/index.spec.tsx | Removed __esModule from plan upgrade modal mock |
| web/app/components/billing/pricing/plans/self-hosted-plan-item/index.spec.tsx | Removed __esModule from toast component mock |
| web/app/components/billing/pricing/plans/index.spec.tsx | Removed __esModule from cloud and self-hosted plan item mocks |
| web/app/components/billing/pricing/plans/cloud-plan-item/index.spec.tsx | Removed __esModule from toast component mock |
| web/app/components/billing/plan/index.spec.tsx | Removed __esModule from verify state modal and upgrade button mocks |
| web/app/components/billing/plan-upgrade-modal/index.spec.tsx | Removed __esModule from base modal mock |
| web/app/components/billing/partner-stack/use-ps-info.spec.tsx | Removed __esModule from js-cookie mock |
| web/app/components/billing/partner-stack/index.spec.tsx | Removed __esModule from partner stack info hook mock |
| web/app/components/billing/header-billing-btn/index.spec.tsx | Removed __esModule from upgrade button mock |
| web/app/components/billing/billing-page/index.spec.tsx | Removed __esModule from plan component mock |
| web/app/components/billing/annotation-full/modal.spec.tsx | Removed __esModule from usage, upgrade button, and modal mocks |
| web/app/components/billing/annotation-full/index.spec.tsx | Removed __esModule from usage and upgrade button mocks |
| web/app/components/base/file-uploader/utils.spec.ts | Removed __esModule from mime library mock |
| web/app/components/apps/list.spec.tsx | Removed __esModule from query state hook, tag filter, app card, empty state, and footer mocks |
| web/app/components/apps/index.spec.tsx | Removed __esModule from document title hook and list component mocks |
| web/app/components/apps/app-card.spec.tsx | Removed __esModule from tooltip and tag selector mocks |
| web/app/components/app/workflow-log/trigger-by-display.spec.tsx | Removed __esModule from theme hook and block icon mocks |
| web/app/components/app/workflow-log/list.spec.tsx | Removed __esModule from timestamp, breakpoints, workflow run, block icon, and theme hook mocks |
| web/app/components/app/workflow-log/index.spec.tsx | Removed __esModule from Next.js link, workflow run, and theme hook mocks |
| web/app/components/app/workflow-log/detail.spec.tsx | Removed __esModule from workflow run mock |
| web/app/components/app/text-generate/saved-items/index.spec.tsx | Removed __esModule from copy-to-clipboard mock |
| web/app/components/app/switch-app-modal/index.spec.tsx | Removed __esModule from apps full dialog mock |
| web/app/components/app/overview/embedded/index.spec.tsx | Removed __esModule from CSS module and copy-to-clipboard mocks |
| web/app/components/app/log-annotation/index.spec.tsx | Removed __esModule from annotation, log, and workflow log component mocks |
| web/app/components/app/duplicate-modal/index.spec.tsx | Removed __esModule from apps full dialog mock |
| web/app/components/app/create-app-modal/index.spec.tsx | Removed __esModule from theme hook mock |
| web/app/components/app/create-app-dialog/app-list/index.spec.tsx | Removed __esModule from type selector, app card, and create app modal mocks |
| web/app/components/app/configuration/prompt-value-panel/index.spec.tsx | Removed __esModule from feature bar mock |
| web/app/components/app/configuration/debug/debug-with-single-model/index.spec.tsx | Removed __esModule from timestamp hook mock |
| web/app/components/app/configuration/debug/debug-with-multiple-model/index.spec.tsx | Removed __esModule from 6 mocks including context hooks, stores, and components |
| web/app/components/app/configuration/dataset-config/settings-modal/retrieval-section.spec.tsx | Removed __esModule from model provider hooks and selector mocks |
| web/app/components/app/configuration/dataset-config/settings-modal/index.spec.tsx | Removed __esModule from step-two, common service, and model provider mocks |
| web/app/components/app/configuration/dataset-config/select-dataset/index.spec.tsx | Removed __esModule from i18next config mock |
| web/app/components/app/configuration/dataset-config/params-config/index.spec.tsx | Removed __esModule from model selector and parameter modal mocks |
| web/app/components/app/configuration/dataset-config/params-config/config-content.spec.tsx | Removed __esModule from model selector and parameter modal mocks |
| web/app/components/app/configuration/dataset-config/index.spec.tsx | Removed __esModule from 5 component mocks including card item, params config, context var, metadata filter, and config context |
| web/app/components/app/configuration/dataset-config/card-item/index.spec.tsx | Removed __esModule from settings modal and breakpoints mocks |
| web/app/components/app/configuration/config/index.spec.tsx | Removed __esModule from 8 mocks including debug hooks and configuration components |
| web/app/components/app/configuration/config/agent/agent-tools/setting-built-in-tool.spec.tsx | Removed __esModule from form component mock |
| web/app/components/app/configuration/config/agent/agent-tools/index.spec.tsx | Removed __esModule from tool picker and setting built-in tool mocks |
| web/app/components/app/configuration/config/agent-setting-button.spec.tsx | Removed __esModule from agent setting mock |
| web/app/components/app/configuration/config-prompt/index.spec.tsx | Removed __esModule from simple and advanced prompt input mocks |
| web/app/components/app/configuration/config-prompt/conversation-history/history-panel.spec.tsx | Removed __esModule from operation button and feature panel mocks |
| web/app/components/app/configuration/config-prompt/conversation-history/edit-modal.spec.tsx | Removed __esModule from modal mock |
| web/app/components/app/configuration/config-prompt/confirm-add-var/index.spec.tsx | Removed __esModule from var highlight mock |
| web/app/components/app/annotation/view-annotation-modal/index.spec.tsx | Removed __esModule from timestamp hook and edit item mocks |
| web/app/components/app/annotation/list.spec.tsx | Removed __esModule from timestamp hook mock |
| web/app/components/app/annotation/index.spec.tsx | Removed __esModule from toast component mock |
| web/app/components/app/annotation/header-opts/index.spec.tsx | Removed __esModule from annotation full component mock |
| web/app/components/app/annotation/edit-annotation-modal/index.spec.tsx | Removed __esModule from timestamp hook and annotation full mocks |
| web/app/components/app/annotation/batch-add-annotation-modal/index.spec.tsx | Removed __esModule from toast, CSV downloader/uploader, and annotation full mocks |
| web/app/components/app/annotation/add-annotation-modal/index.spec.tsx | Removed __esModule from toast component mock |
| web/app/components/app-sidebar/text-squeeze-fix-verification.spec.tsx | Removed __esModule from classnames utility mock |
| web/app/components/app-sidebar/dataset-info/index.spec.tsx | Removed __esModule from rename modal mock |
| web/tests/workflow-parallel-limit.test.tsx | Removed __esModule from iteration config hook mock |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Important
Fixes #<issue number>.Summary
Screenshots
Checklist
dev/reformat(backend) andcd web && npx lint-staged(frontend) to appease the lint gods