react18-enzyme-to-rtl - 将 Enzyme 测试迁移至 React Testing Library 以支持 React 18
提供用于 React 18 升级的 Enzyme 至 React Testing Library 迁移模式。
标签
更新于: 2026-09-13该技能可以做什么
- 提供 Enzyme 至 RTL 迁移模式
- 映射 Enzyme 与 RTL API
- 将实现测试重写为行为测试
输入
- Enzyme 测试文件
- React 组件文件
输出
- React Testing Library 测试文件
要求
- React 18
- @testing-library/react
- @testing-library/user-event
