Avoid deep imports and migrate tests#202
Conversation
|
@QDyanbing is attempting to deploy a commit to the React Component Team on Vercel. A member of the Team first needs to authorize it. |
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ 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. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
Walkthrough本 PR 将 react-component/rate 从 Enzyme 测试框架迁移至 React Testing Library,同时升级 React 至 18.x、更新 ChangesEnzyme 到 RTL 迁移与 React 18 升级
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
There was a problem hiding this comment.
Code Review
This pull request migrates the testing framework from Enzyme to React Testing Library and updates React and its type definitions to version 18. It also refactors imports from @rc-component/util to use named exports and adds several type exports to the main entry point. A review comment identifies a potential flaw in the characterRender test where the DOM query might return an empty list, potentially leading to a false positive.
变更内容
@rc-component/util到包含根入口导出的版本,并升级@rc-component/father-plugin。@rc-component/util/lib/...深路径导入调整为从@rc-component/util根入口导入。RateProps、RateRef和StarProps类型。enzyme、enzyme-adapter-react-16、enzyme-to-json和相关 serializer/setup 配置。peerDependencies保持不变。验证
npm test -- --runInBand通过。npm run lint通过,保留既有react-hooks/exhaustive-depswarning。Summary by CodeRabbit
发布说明
重构
测试
杂项