test(custom-request): update test case, avoid failed (#2954)

* test(custom-request): update test case, avoid failed

* fix: case
This commit is contained in:
Dunqing 2023-11-03 16:19:11 +08:00 committed by GitHub
parent 93bf86d931
commit 3220173e83
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 21 deletions

View File

@ -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,
],
}
`;

View File

@ -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]);
});
});
});