This commit is contained in:
kakkokari-gtyih
2024-07-02 18:44:57 +09:00
parent 646750cd98
commit 70fe3574a8
2 changed files with 12 additions and 7 deletions

View File

@@ -409,9 +409,6 @@ describe('ユーザー', () => {
{ parameters: () => ({ name: 'x'.repeat(50) }) },
{ parameters: () => ({ name: 'x' }) },
{ parameters: () => ({ name: 'My name' }) },
{ parameters: () => ({ name: '' }), expect: { name: null } },
{ parameters: () => ({ name: ' name with spaces ' }), expect: { name: 'name with spaces' } },
{ parameters: () => ({ name: ' ' }), expect: { name: null } },
{ parameters: () => ({ description: null }) },
{ parameters: () => ({ description: 'x'.repeat(1500) }) },
{ parameters: () => ({ description: 'x' }) },
@@ -468,9 +465,9 @@ describe('ユーザー', () => {
{ parameters: () => ({ notificationRecieveConfig: {} }) },
{ parameters: () => ({ emailNotificationTypes: ['mention', 'reply', 'quote', 'follow', 'receiveFollowRequest'] }) },
{ parameters: () => ({ emailNotificationTypes: [] }) },
] as const)('を書き換えることができる($#)', async ({ parameters, expect }) => {
] as const)('を書き換えることができる($#)', async ({ parameters }) => {
const response = await successfulApiCall({ endpoint: 'i/update', parameters: parameters(), user: alice });
const expected = { ...meDetailed(alice, true), ...parameters(), ...expect };
const expected = { ...meDetailed(alice, true), ...parameters() };
assert.deepStrictEqual(response, expected, inspect(parameters()));
});