diff --git a/packages/plugins/@nocobase/plugin-custom-request/src/server/__tests__/__snapshots__/actions.test.ts.snap b/packages/plugins/@nocobase/plugin-custom-request/src/server/__tests__/__snapshots__/actions.test.ts.snap index bd9980513..81af83be9 100644 --- a/packages/plugins/@nocobase/plugin-custom-request/src/server/__tests__/__snapshots__/actions.test.ts.snap +++ b/packages/plugins/@nocobase/plugin-custom-request/src/server/__tests__/__snapshots__/actions.test.ts.snap @@ -7,23 +7,3 @@ exports[`actions send currentRecord.data 1`] = ` "username": "testname", } `; - -exports[`actions send currentUser with association data 1`] = ` -{ - "a": [ - "member", - "root", - "admin", - ], - "b": [ - "{{t("Member")}}", - "{{t("Root")}}", - "{{t("Admin")}}", - ], - "c": [ - 1, - 1, - 1, - ], -} -`; diff --git a/packages/plugins/@nocobase/plugin-custom-request/src/server/__tests__/actions.test.ts b/packages/plugins/@nocobase/plugin-custom-request/src/server/__tests__/actions.test.ts index 4f0ef1d0b..8e2d5546e 100644 --- a/packages/plugins/@nocobase/plugin-custom-request/src/server/__tests__/actions.test.ts +++ b/packages/plugins/@nocobase/plugin-custom-request/src/server/__tests__/actions.test.ts @@ -154,7 +154,9 @@ describe('actions', () => { filterByTk: 'currentUser-with-association-data', }); expect(res.status).toBe(200); - expect(params).toMatchSnapshot(); + expect(expect.arrayContaining(params.a)).toMatchObject(['root', 'member', 'admin']); + expect(expect.arrayContaining(params.b)).toMatchObject(['{{t("Member")}}', '{{t("Root")}}', '{{t("Admin")}}']); + expect(expect.arrayContaining(params.c)).toMatchObject([1, 1, 1]); }); }); });