- 添加 Jest 配置和测试设置 - 添加 use-categories hook 的单元测试 - 更新 CLAUDE.md 添加包管理工具说明 - 优化首页、视频页和频道页的组件结构 - 添加 .claude 命令配置文件 - 移除 bun.lock 和 package-lock.json,统一使用 bun - 更新 package.json 依赖 Co-Authored-By: Claude <noreply@anthropic.com>
15 lines
434 B
TypeScript
15 lines
434 B
TypeScript
import React from 'react'
|
|
import { render } from '@testing-library/react-native'
|
|
import type { RenderOptions } from '@testing-library/react-native'
|
|
|
|
// 自定义渲染函数,可以在这里添加 Provider 等
|
|
export function renderWithProviders(
|
|
ui: React.ReactElement,
|
|
options?: Omit<RenderOptions, 'wrapper'>,
|
|
) {
|
|
return render(ui, options)
|
|
}
|
|
|
|
// 重新导出所有测试工具
|
|
export * from '@testing-library/react-native'
|