-
-
Notifications
You must be signed in to change notification settings - Fork 757
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
Refactor src/components/CollapsibleDropdown/CollapsibleDropdown.test.tsx from Jest to Vitest #2809 #2868
Refactor src/components/CollapsibleDropdown/CollapsibleDropdown.test.tsx from Jest to Vitest #2809 #2868
Conversation
WalkthroughThis pull request focuses on migrating the test suite for the Changes
Possibly related issues
Possibly related PRs
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: .coderabbit.yaml 📒 Files selected for processing (1)
🧰 Additional context used📓 Learnings (2)📓 Common learnings
src/components/CollapsibleDropdown/CollapsibleDropdown.spec.tsx (1)
🔇 Additional comments (5)src/components/CollapsibleDropdown/CollapsibleDropdown.spec.tsx (5)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
Our Pull Request Approval ProcessThanks for contributing! Testing Your CodeRemember, your PRs won't be reviewed until these criteria are met:
Our policies make our code better. ReviewersDo not assign reviewers. Our Queue Monitors will review your PR and assign them.
Reviewing Your CodeYour reviewer(s) will have the following roles:
CONTRIBUTING.mdRead our CONTRIBUTING.md file. Most importantly:
Other
|
hi @palisadoes actually while working on this when I run this after I did the changes from jest to vi, all the test fails, there is one segment of code where we use ( useLocation ) hook and it is not working in Vitest. While searching about this issue on the internet I found others have also faced that so I have altered that logic and now it works completely fine. Please review it once if any change require do let me know. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop-postgres #2868 +/- ##
=====================================================
+ Coverage 63.58% 87.82% +24.24%
=====================================================
Files 296 313 +17
Lines 7371 8224 +853
Branches 1610 1799 +189
=====================================================
+ Hits 4687 7223 +2536
+ Misses 2451 802 -1649
+ Partials 233 199 -34 ☔ View full report in Codecov by Sentry. |
5feefcd
into
PalisadoesFoundation:develop-postgres
Refactored src/components/CollapsibleDropdown/CollapsibleDropdown.test.tsx to
src/components/CollapsibleDropdown/CollapsibleDropdown.spec.tsx
Issue: #2809: #2809
Changes Implemented:
Refactored the testing framework from Jest to Vitest in src/components/CollapsibleDropdown/CollapsibleDropdown.test.tsx.
Altered the Mock logic as it was not suitable for the Vitest.
Updated import statements, mocking methods, and assertions to align with Vitest conventions.
Verified compatibility with the existing codebase using Vitest.
FromCollapsibleDropdown.test.tsx → CollapsibleDropdown.spec.tsx to follow the naming convention for Vitest.
Refactor
src/components/CollapsibleDropdown/CollapsibleDropdown.test.tsx
from Jest to Vitest #2809Other information
I have read the previous refactor PR and tried to keep things as uniform as possible.
Please suggest any other changes if required.
Summary by CodeRabbit
CollapsibleDropdown
component to utilize Vitest's mocking capabilities.afterEach
hook to ensure a clean state after each test.