张翔
|
7cbb7a9ac8
|
fix(test): 修复测试环境问题
ci/woodpecker/push/woodpecker Pipeline failed
1. jest.setup.js:
- 添加 Request/Response/Headers 全局对象 mock
- 解决 'Request is not defined' 错误
2. .eslintrc.json:
- 将 jest.setup.js 添加到忽略列表
3. shared-mocks.tsx:
- 添加 ArrowUp 图标 mock
4. back-to-top.test.tsx:
- 重写测试使用 import 语法
- 使用 fireEvent.scroll 触发滚动事件
- 修复组件渲染测试
|
2026-03-29 14:50:09 +08:00 |
|