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]: "促销" }) }) })