-
-
Notifications
You must be signed in to change notification settings - Fork 864
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
fixed:#2475 Refactor: src/components/AddOn/support/components/MainContent/MainContent.test.tsx from Jest to Vitest #2843
fixed:#2475 Refactor: src/components/AddOn/support/components/MainContent/MainContent.test.tsx from Jest to Vitest #2843
Conversation
WalkthroughThe pull request involves modifications to the Changes
Possibly related issues
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: .coderabbit.yaml 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
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
|
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.
Actionable comments posted: 0
🧹 Nitpick comments (1)
src/components/AddOn/support/components/MainContent/MainContent.spec.tsx (1)
3-4
: Consider using a global test setup file for@testing-library/jest-dom
imports
You can consolidate these matcher imports in a global setup file, reducing duplication across test files and ensuring a consistent testing configuration.
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
src/components/AddOn/support/components/MainContent/MainContent.spec.tsx
(2 hunks)
🔇 Additional comments (1)
src/components/AddOn/support/components/MainContent/MainContent.spec.tsx (1)
16-16
: Switching from test
to it
aligns well with Vitest’s BDD style
The updated test name and assertion flow are consistent and readable.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop-postgres #2843 +/- ##
=====================================================
+ Coverage 66.44% 87.80% +21.36%
=====================================================
Files 296 313 +17
Lines 7369 8222 +853
Branches 1609 1854 +245
=====================================================
+ Hits 4896 7219 +2323
+ Misses 2231 804 -1427
+ Partials 242 199 -43 ☔ View full report in Codecov by Sentry. |
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.
See comment
src/components/AddOn/support/components/MainContent/MainContent.spec.tsx
Outdated
Show resolved
Hide resolved
ce358e5
into
PalisadoesFoundation:develop-postgres
What kind of change does this PR introduce?
Issue Number: #2475
Fixes :
Refactored the testing framework from Jest to Vitest in src/components/AddOn/support/components/MainContent/MainContent.test.tsx
Updated import statements, mocking methods, and assertions to align with Vitest conventions.
Verified compatibility with the existing codebase using Vitest.
Renamed the test file:
From checkConnection.test.ts → checkConnection.spec.ts to follow the naming convention for Vitest.
Ran all tests successfully under the Vitest environment.
Did you add tests for your changes?
Snapshots/Videos:
If relevant, did you update the documentation?
Summary
The test file was initially using Jest, but as part of the migration to Vitest, the following updates were made:
.spec.*
suffix.npm run test:vitest
.Does this PR introduce a breaking change?
No
Have you read the contributing guide?
Yes
Summary by CodeRabbit
Summary by CodeRabbit
MainContent
component with additional matchers.