-
-
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
fixed :#2750 Refactor: src/setup/askForTalawaApiUrl/setupTalawaWebSocketUrl.test.ts from Jest to Vitest #2779
fixed :#2750 Refactor: src/setup/askForTalawaApiUrl/setupTalawaWebSocketUrl.test.ts from Jest to Vitest #2779
Conversation
WalkthroughThis pull request involves migrating the test file Changes
Possibly related issues
Possibly related PRs
Suggested reviewers
Poem
Tip CodeRabbit's docstrings feature is now available as part of our Early Access Program! Simply use the command 📜 Recent review detailsConfiguration used: .coderabbit.yaml 📒 Files selected for processing (1)
🔇 Additional comments (6)src/setup/askForTalawaApiUrl/setupTalawaWebSocketUrl.spec.ts (6)
Replacing
Mocking the
Using an async import combined with spread of the actual module ensures that only the
This is the correct Vitest equivalent for resetting mocks between tests.
Switching from
Using 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
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop-postgres #2779 +/- ##
====================================================
- Coverage 95.82% 87.27% -8.55%
====================================================
Files 295 313 +18
Lines 7037 8204 +1167
Branches 1520 1848 +328
====================================================
+ Hits 6743 7160 +417
- Misses 98 859 +761
+ Partials 196 185 -11 ☔ View full report in Codecov by Sentry. |
dbe3387
into
PalisadoesFoundation:develop-postgres
What kind of change does this PR introduce?
Issue Number: #2750
Fixes :
Refactored the testing framework from Jest to Vitest in src/setup/checkConnection/checkConnection.test.ts.
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