parent
							
								
									c0938fe372
								
							
						
					
					
						commit
						1811725b9d
					
				
					 1 changed files with 10 additions and 5 deletions
				
			
		|  | @ -318,7 +318,7 @@ describe('Streaming', () => { | ||||||
| 			}, 3000); | 			}, 3000); | ||||||
| 		})); | 		})); | ||||||
| 
 | 
 | ||||||
| 		it('フォローしているローカルユーザーのダイレクト投稿が流れる', () => new Promise(async done => { | 		it('フォローしているローカルユーザーのダイレクト投稿は流れない', () => new Promise(async done => { | ||||||
| 			const alice = await signup({ username: 'alice' }); | 			const alice = await signup({ username: 'alice' }); | ||||||
| 			const bob = await signup({ username: 'bob' }); | 			const bob = await signup({ username: 'bob' }); | ||||||
| 
 | 
 | ||||||
|  | @ -327,12 +327,11 @@ describe('Streaming', () => { | ||||||
| 				userId: bob.id | 				userId: bob.id | ||||||
| 			}, alice); | 			}, alice); | ||||||
| 
 | 
 | ||||||
|  | 			let fired = false; | ||||||
|  | 
 | ||||||
| 			const ws = await connectStream(alice, 'localTimeline', ({ type, body }) => { | 			const ws = await connectStream(alice, 'localTimeline', ({ type, body }) => { | ||||||
| 				if (type == 'note') { | 				if (type == 'note') { | ||||||
| 					assert.deepStrictEqual(body.userId, bob.id); | 					fired = true; | ||||||
| 					assert.deepStrictEqual(body.text, 'foo'); |  | ||||||
| 					ws.close(); |  | ||||||
| 					done(); |  | ||||||
| 				} | 				} | ||||||
| 			}); | 			}); | ||||||
| 
 | 
 | ||||||
|  | @ -342,6 +341,12 @@ describe('Streaming', () => { | ||||||
| 				visibility: 'specified', | 				visibility: 'specified', | ||||||
| 				visibleUserIds: [alice.id] | 				visibleUserIds: [alice.id] | ||||||
| 			}); | 			}); | ||||||
|  | 
 | ||||||
|  | 			setTimeout(() => { | ||||||
|  | 				assert.strictEqual(fired, false); | ||||||
|  | 				ws.close(); | ||||||
|  | 				done(); | ||||||
|  | 			}, 3000); | ||||||
| 		})); | 		})); | ||||||
| 
 | 
 | ||||||
| 		it('フォローしていないローカルユーザーのフォロワー宛て投稿は流れない', () => new Promise(async done => { | 		it('フォローしていないローカルユーザーのフォロワー宛て投稿は流れない', () => new Promise(async done => { | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue