-
-
Notifications
You must be signed in to change notification settings - Fork 847
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
feat!: Migrate Testing Framework from Jest to Vitest of src/components/TableLoader/TableLoader.test.tsx #3126
Conversation
WalkthroughThis pull request involves the removal of the Changes
Assessment against linked issues
Possibly related issues
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: .coderabbit.yaml ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (3)
💤 Files with no reviewable changes (1)
🧰 Additional context used📓 Learnings (1)src/components/TableLoader/TableLoader.spec.tsx (1)
🔇 Additional comments (3)
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: 1
🧹 Nitpick comments (3)
package.json (1)
141-141
: Added @vitest/coverage-v8 for coverage instrumentation.Consider configuring your coverage thresholds in vitest.config.js to ensure robust coverage checks.
🧰 Tools
🪛 GitHub Actions: PR Workflow
[error] Unauthorized modification or deletion of sensitive file. Apply 'ignore-sensitive-files-pr' label to override.
vitest.config.js (2)
6-6
: Clean up trailing spaces to resolve Prettier warnings.Remove the unwanted whitespace on this line to maintain formatting consistency.
- globals: true, // Use global APIs like `vi` + globals: true, // Use global APIs like `vi`🧰 Tools
🪛 eslint
[error] 6-6: Delete
·······
(prettier/prettier)
8-8
: Add a new line at the end of the file to satisfy Prettier format.Insert an extra newline after the closing bracket to maintain consistent file endings.
}, }); +
🧰 Tools
🪛 eslint
[error] 8-8: Insert
⏎
(prettier/prettier)
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
package-lock.json
is excluded by!**/package-lock.json
📒 Files selected for processing (3)
package.json
(3 hunks)src/components/TableLoader/TableLoader.spec.tsx
(4 hunks)vitest.config.js
(1 hunks)
🧰 Additional context used
🪛 eslint
src/components/TableLoader/TableLoader.spec.tsx
[error] 5-5: '/home/jailuser/git/node_modules/vitest/dist/index.js' imported multiple times.
(import/no-duplicates)
[error] 6-6: '/home/jailuser/git/node_modules/vitest/dist/index.js' imported multiple times.
(import/no-duplicates)
vitest.config.js
[error] 6-6: Delete ·······
(prettier/prettier)
[error] 8-8: Insert ⏎
(prettier/prettier)
🪛 GitHub Actions: PR Workflow
package.json
[error] Unauthorized modification or deletion of sensitive file. Apply 'ignore-sensitive-files-pr' label to override.
🔇 Additional comments (5)
src/components/TableLoader/TableLoader.spec.tsx (3)
12-12
: Mocking console.error is correct.This ensures that error messages are scannable or suppressible during tests without polluting the console. Good job!
16-16
: Updating test blocks to 'it' from 'test'.This aligns with Vitest's recommended style. The usage here is correct.
Line range hint
69-79
: Refined error assertion withtoThrowError
.Using
toThrowError
is clearer thantoThrow
for verifying error conditions in Vitest. Excellent change.package.json (2)
120-120
: Reinstating @testing-library/dom is consistent with test usage.Please verify if all test references to this library are valid and add any missing test coverage if needed.
🧰 Tools
🪛 GitHub Actions: PR Workflow
[error] Unauthorized modification or deletion of sensitive file. Apply 'ignore-sensitive-files-pr' label to override.
162-162
: Upgraded Vitest to ^2.1.8.Upgrading to a newer version can bring performance benefits and bug fixes. Confirm that all references to Vitest's new features are documented.
🧰 Tools
🪛 GitHub Actions: PR Workflow
[error] Unauthorized modification or deletion of sensitive file. Apply 'ignore-sensitive-files-pr' label to override.
@coderabbitai full review |
✅ Actions performedFull review triggered. |
@coderabbitai review |
✅ Actions performedReview triggered.
|
|
What kind of change does this PR introduce?
Migration of testing framework from Jest to Vitest of src/components/TableLoader/TableLoader.test.tsx
Issue Number:
Fixes #2822
Did you add tests for your changes?
Yes
Snapshots/Videos:
If relevant, did you update the documentation?
No
Summary
Added vitest.config.js file and changed the required functions from jest to vitest syntax.
Contributing to talawa-admin grows my technical skills alot.
Does this PR introduce a breaking change?
No
Other information
No
Have you read the contributing guide?
Yes
Summary by CodeRabbit
Dependency Updates
package.json
file, impacting project configurations and dependencies.Testing Improvements
TableLoader
component tests.