Specify Record<string, unknown>

This commit is contained in:
Acid Chicken (硫酸鶏) 2019-07-01 23:07:54 +09:00
parent d22e21c597
commit f5972cabb3
No known key found for this signature in database
GPG key ID: 5388F56C75B677A1

View file

@ -62,8 +62,8 @@ describe('Mute', () => {
assert.strictEqual(res.status, 200);
assert.strictEqual(Array.isArray(res.body), true);
assert.strictEqual(res.body.some(note => note.id === bobNote.id), true);
assert.strictEqual(res.body.some(note => note.id === carolNote.id), false);
assert.strictEqual(res.body.some((note: Record<string, unknown>) => note.id === bobNote.id), true);
assert.strictEqual(res.body.some((note: Record<string, unknown>) => note.id === carolNote.id), false);
}));
it('ミュートしているユーザーからメンションされても、hasUnreadMentions が true にならない', async(async () => {
@ -131,9 +131,9 @@ describe('Mute', () => {
assert.strictEqual(res.status, 200);
assert.strictEqual(Array.isArray(res.body), true);
assert.strictEqual(res.body.some(note => note.id === aliceNote.id), true);
assert.strictEqual(res.body.some(note => note.id === bobNote.id), true);
assert.strictEqual(res.body.some(note => note.id === carolNote.id), false);
assert.strictEqual(res.body.some((note: Record<string, unknown>) => note.id === aliceNote.id), true);
assert.strictEqual(res.body.some((note: Record<string, unknown>) => note.id === bobNote.id), true);
assert.strictEqual(res.body.some((note: Record<string, unknown>) => note.id === carolNote.id), false);
}));
it('タイムラインにミュートしているユーザーの投稿のRenoteが含まれない', async(async () => {
@ -147,9 +147,9 @@ describe('Mute', () => {
assert.strictEqual(res.status, 200);
assert.strictEqual(Array.isArray(res.body), true);
assert.strictEqual(res.body.some(note => note.id === aliceNote.id), true);
assert.strictEqual(res.body.some(note => note.id === bobNote.id), false);
assert.strictEqual(res.body.some(note => note.id === carolNote.id), false);
assert.strictEqual(res.body.some((note: Record<string, unknown>) => note.id === aliceNote.id), true);
assert.strictEqual(res.body.some((note: Record<string, unknown>) => note.id === bobNote.id), false);
assert.strictEqual(res.body.some((note: Record<string, unknown>) => note.id === carolNote.id), false);
}));
});
@ -163,8 +163,8 @@ describe('Mute', () => {
assert.strictEqual(res.status, 200);
assert.strictEqual(Array.isArray(res.body), true);
assert.strictEqual(res.body.some(notification => notification.userId === bob.id), true);
assert.strictEqual(res.body.some(notification => notification.userId === carol.id), false);
assert.strictEqual(res.body.some((notification: Record<string, unknown>) => notification.userId === bob.id), true);
assert.strictEqual(res.body.some((notification: Record<string, unknown>) => notification.userId === carol.id), false);
}));
});
});