fix: 修复 Jest 测试配置和 useCategories hook 实现

- 修复 jest.setup.js 中不存在的 NativeAnimatedHelper 模块引用
- 优化 jest.config.js 配置,分离 js 和 ts/tsx 的转换配置
- 添加 @testing-library/react 依赖
- 导出 useCategoriesStore 以供测试使用
- 修复 useCategories hook 的参数合并逻辑,确保 inputParams 正确覆盖默认参数
- 修复错误处理时 data 状态设置为 null
- 更新 CategoriesState 类型定义,允许 data 为 null

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
imeepos
2026-01-19 11:46:51 +08:00
parent 687cfcf725
commit a1544ec85f
5 changed files with 2904 additions and 37 deletions

2865
bun.lock Normal file

File diff suppressed because it is too large Load Diff