From 1f48a02083a569c283652abe41d922e87f68977c Mon Sep 17 00:00:00 2001 From: wc24 Date: Tue, 30 Jun 2026 17:47:08 +0800 Subject: [PATCH] =?UTF-8?q?test+chore:=20=E4=BF=AE=20stale=20=E6=B5=8B?= =?UTF-8?q?=E8=AF=95(=5Flabel=E2=86=92refs=20=E6=96=B0=E5=A5=91=E7=BA=A6)+?= =?UTF-8?q?=20bump=200.7.10?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit crudRegistry.test 还在断言已退场的 tagIds_label,改断言整页 refs 字典。 两端版本归一到 0.7.10。 --- package.json | 2 +- test/crudRegistry.test.ts | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 0dc8105..60db77d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "shrimp-server", - "version": "0.7.7", + "version": "0.7.10", "description": "Shrimp 框架后端 — 声明式字段驱动的 Node.js 管理后台框架(Express + Mongoose + JWT)", "main": "dist/main/index.js", "types": "dist/main/index.d.ts", diff --git a/test/crudRegistry.test.ts b/test/crudRegistry.test.ts index 428050b..c5f0fce 100644 --- a/test/crudRegistry.test.ts +++ b/test/crudRegistry.test.ts @@ -34,6 +34,7 @@ describe("crudRegistry 自动登记", () => { await productCrud.add({ code: "P001", tagIds: [t1._id, t2._id] } as any) const result = await productModule.list({}) - expect((result.list[0] as any).tagIds_label).toEqual(["热门", "促销"]) + // _label 逐行机制已退场:relation 显示名走整页 refs 字典(refs[moduleKey][id]) + expect((result as any).refs?.tag).toEqual({ [t1._id]: "热门", [t2._id]: "促销" }) }) })