From 1811725b9dec64cc3a37c1297928a75ab59fe007 Mon Sep 17 00:00:00 2001 From: rinsuki <428rinsuki+git@gmail.com> Date: Thu, 9 Jan 2020 17:29:03 +0900 Subject: [PATCH] =?UTF-8?q?=E3=83=AD=E3=83=BC=E3=82=AB=E3=83=AB=E3=82=BF?= =?UTF-8?q?=E3=82=A4=E3=83=A0=E3=83=A9=E3=82=A4=E3=83=B3=E3=81=AE=E3=83=86?= =?UTF-8?q?=E3=82=B9=E3=83=88=E3=82=92=E4=BF=AE=E6=AD=A3=20(#5699)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit visibility=specifiedな投稿はローカルタイムラインに流れない --- test/streaming.ts | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/test/streaming.ts b/test/streaming.ts index cb962cfb3..23d01757d 100644 --- a/test/streaming.ts +++ b/test/streaming.ts @@ -318,7 +318,7 @@ describe('Streaming', () => { }, 3000); })); - it('フォローしているローカルユーザーのダイレクト投稿が流れる', () => new Promise(async done => { + it('フォローしているローカルユーザーのダイレクト投稿は流れない', () => new Promise(async done => { const alice = await signup({ username: 'alice' }); const bob = await signup({ username: 'bob' }); @@ -327,12 +327,11 @@ describe('Streaming', () => { userId: bob.id }, alice); + let fired = false; + const ws = await connectStream(alice, 'localTimeline', ({ type, body }) => { if (type == 'note') { - assert.deepStrictEqual(body.userId, bob.id); - assert.deepStrictEqual(body.text, 'foo'); - ws.close(); - done(); + fired = true; } }); @@ -342,6 +341,12 @@ describe('Streaming', () => { visibility: 'specified', visibleUserIds: [alice.id] }); + + setTimeout(() => { + assert.strictEqual(fired, false); + ws.close(); + done(); + }, 3000); })); it('フォローしていないローカルユーザーのフォロワー宛て投稿は流れない', () => new Promise(async done => {