From f5972cabb3d4c50c161c1509b21e87cb172ee391 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Acid=20Chicken=20=28=E7=A1=AB=E9=85=B8=E9=B6=8F=29?= Date: Mon, 1 Jul 2019 23:07:54 +0900 Subject: [PATCH] Specify Record --- test/mute.ts | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/test/mute.ts b/test/mute.ts index bf24b55ee..824daf43d 100644 --- a/test/mute.ts +++ b/test/mute.ts @@ -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) => note.id === bobNote.id), true); + assert.strictEqual(res.body.some((note: Record) => 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) => note.id === aliceNote.id), true); + assert.strictEqual(res.body.some((note: Record) => note.id === bobNote.id), true); + assert.strictEqual(res.body.some((note: Record) => 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) => note.id === aliceNote.id), true); + assert.strictEqual(res.body.some((note: Record) => note.id === bobNote.id), false); + assert.strictEqual(res.body.some((note: Record) => 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) => notification.userId === bob.id), true); + assert.strictEqual(res.body.some((notification: Record) => notification.userId === carol.id), false); })); }); });