test: 为 app/auth.tsx 添加完整的测试覆盖

- 新增 app/auth.test.tsx,包含 10 个测试用例
- 测试覆盖加载状态、认证状态、未认证状态、导航行为和副作用
- 优化 Jest 配置,添加 skipLibCheck 和 useLocalSearchParams mock
- 添加必要的组件 mock(FlashList、icon、HomeSkeleton 等)
- 添加 coverage 目录到 .gitignore
- 修复 index.tsx 中多余的 key 属性
- 更新 tsconfig.json 添加 esModuleInterop 和 skipLibCheck

测试覆盖率: app/auth.tsx 达到 100%

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
imeepos
2026-01-19 12:41:10 +08:00
parent a1544ec85f
commit 6e85460b2e
7 changed files with 1160 additions and 3 deletions

2
.gitignore vendored
View File

@@ -2,7 +2,7 @@
# dependencies
node_modules/
coverage
# Expo
.expo/
dist/