-
Notifications
You must be signed in to change notification settings - Fork 92
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: support vitest #295
feat: support vitest #295
Conversation
and export router context extend
Warning Rate limit exceeded@fengmk2 has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 27 minutes and 24 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (4)
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
CodeRabbit Configuration File (
|
commit: |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #295 +/- ##
==========================================
- Coverage 97.46% 97.17% -0.29%
==========================================
Files 11 11
Lines 3548 3578 +30
Branches 631 632 +1
==========================================
+ Hits 3458 3477 +19
- Misses 90 101 +11 ☔ View full report in Codecov by Sentry. |
[skip ci] ## [6.4.0](v6.3.2...v6.4.0) (2025-03-01) ### Features * support vitest ([#295](#295)) ([500c4ac](500c4ac))
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.
PR Overview
This PR adds support for vitest and extends the router context by exporting additional properties.
- Skips a test that checks for TypeScript file loading in test/egg-ts.test.ts
- Extends the router context in src/egg.ts with properties such as params, captures, routerName, and routerPath
- Updates TypeScript support in src/loader/file_loader.ts by replacing the previous environment check with a function call to isSupportTypeScript()
Reviewed Changes
File | Description |
---|---|
test/egg-ts.test.ts | Skips a test that checks TS file loading; ensure the skip is intentional and documented |
src/egg.ts | Adds router context extension properties with inline documentation |
src/loader/file_loader.ts | Replaces environment check with isSupportTypeScript for file matching |
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
Comments suppressed due to low confidence (1)
test/egg-ts.test.ts:144
- [nitpick] Skipping this test reduces the overall test coverage; please ensure that the test is intentionally being skipped and document the reason for future maintainers.
it.skip('should not load ts files while EGG_TYPESCRIPT was true but no extensions', async () => {
and export router context extend