Avoid deep imports and migrate tests#227
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. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (7)
💤 Files with no reviewable changes (2)
概览该 PR 完成了从 Enzyme 到 React Testing Library 的测试框架迁移,同时升级 React 版本至 18.x,更新 变更清单测试框架迁移与依赖升级
🎯 4 (复杂) | ⏱️ ~60 分钟相关 PR
建议审阅者
🚥 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 upgrades the library to React 18 and migrates the entire test suite from Enzyme to React Testing Library. Key changes include updating dependencies in package.json, simplifying utility imports from @rc-component/util, and refactoring test files to use render and DOM-based queries instead of Enzyme's mount and wrapper methods. I have no feedback to provide.
|
Refs ant-design/ant-design#58115 antd 侧统一跟踪 rc 包 es/lib 深路径引用问题。 |
变更内容
@rc-component/util到包含根入口导出的版本,并升级@rc-component/father-plugin。@rc-component/util/lib/...深路径导入调整为从@rc-component/util根入口导入。enzyme、enzyme-adapter-react-16、enzyme-to-json、cheerio、regenerator-runtime和 enzyme snapshot serializer/setup 配置。peerDependencies保持不变。验证
npm test -- --runInBand通过。npm run lint通过,保留既有react-hooks/exhaustive-depswarning。Summary by CodeRabbit
发布说明
Chores
Tests