test(header): 补充 lucide-react mock 的 Sun/Moon 图标

- header 接入 ThemeToggle 后,其测试 mock 的 lucide-react 缺 Sun/Moon
- 导致 theme-toggle 内 <Sun/>/<Moon/> 导入为 undefined,14 例渲染失败
- 补齐后 14 例通过,全量单测 128 suites / 1624 passed
This commit is contained in:
2026-09-01 06:50:59 +08:00
parent 37a7738431
commit e0828db0cc
+2
View File
@@ -62,6 +62,8 @@ jest.mock('lucide-react', () => ({
Menu: () => <span data-testid="menu-icon" />,
X: () => <span data-testid="x-icon" />,
MessageCircle: () => <span data-testid="message-circle-icon" />,
Sun: () => <span data-testid="sun-icon" />,
Moon: () => <span data-testid="moon-icon" />,
}));
jest.mock('@/components/ui/button', () => {