docs: record yonexus unit test progress

This commit is contained in:
nav
2026-04-09 00:03:41 +00:00
parent d8af91cc0b
commit 733e02025b
3 changed files with 17 additions and 2 deletions

View File

@@ -1010,10 +1010,25 @@
**目标**
- 覆盖 registry、pairing、auth、heartbeat sweep
**当前进展2026-04-09**
- 已为 `Yonexus.Server` 接入 `vitest` 测试基础设施(`package.json` + `vitest.config.ts`
- 已新增 `tests/pairing-and-rules.test.ts`
- 已覆盖 pairing request 创建、有效/无效/过期 code 校验、通知状态迁移
- 已覆盖 server rule registry 的 exact-match dispatch、保留字拒绝、重复注册拒绝
- **待补**auth 校验、runtime/registry 协作、heartbeat/liveness sweep 相关测试
### YNX-1103 编写 Client 单元测试
**目标**
- 覆盖状态机、keypair、auth 构造、heartbeat timer
**当前进展2026-04-09**
- 已为 `Yonexus.Client` 接入 `vitest` 测试基础设施(`package.json` + `vitest.config.ts`
- 已新增 `tests/state-and-rules.test.ts`
- 已覆盖 client state 文件缺失初始化、状态保存/回读
- 已覆盖 `ensureClientKeyPair()` 的首次生成/重复调用复用,以及签名/验签基本链路
- 已覆盖 client rule registry 的 dispatch、保留字拒绝、重复注册拒绝
- **待补**runtime 状态机、auth_request 构造细节、heartbeat timer 与重连行为测试
### YNX-1104 编写 Server-Client 集成测试
**目标**
- 覆盖首次配对、正常重连、认证失败、心跳超时、re-pair