docs: Web 测试基建(#27)变更记录与开发交接记录
This commit is contained in:
@@ -537,6 +537,25 @@
|
||||
|
||||
---
|
||||
|
||||
## 2026-08-13 模块:Web 测试基建(计划 #27)
|
||||
|
||||
### 做了什么
|
||||
|
||||
- Web 引入 Vitest(jsdom),`npm test` 命令;`utils/format.ts` 公共函数 + 3 个单测;巡检页接入公共函数。
|
||||
|
||||
### 思路与决策
|
||||
|
||||
- 测试基建先搭最小可用(vitest + jsdom),纯函数优先测试(TDD 红→绿),组件测试等后续按需补;
|
||||
- 抽取内联映射为公共函数,既便于复用也给了首批可测单元;
|
||||
- Go 侧测试骨架此前已随各模块建立(model/service/handler 均有单测)。
|
||||
|
||||
### 验证与部署
|
||||
|
||||
- `npm test` 3/3、lint、build 全过;无后端/schema 变更,Web 已同步部署;
|
||||
- 相关提交:`0e6dc00`;回滚见服务器 README(web `dist.old-20260813-4`)。
|
||||
|
||||
---
|
||||
|
||||
## 环境与踩坑备忘(新同事必读)
|
||||
|
||||
- **VPN**:开发服务器经 NetBird 访问;服务 Running 后需 `netbird up`,登录走 SSO(管理端 `115.191.19.95:6680`)。
|
||||
|
||||
Reference in New Issue
Block a user