summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorrinsuki <428rinsuki+git@gmail.com>2020-01-09 17:29:03 +0900
committersyuilo <Syuilotan@yahoo.co.jp>2020-01-09 17:29:03 +0900
commit1811725b9dec64cc3a37c1297928a75ab59fe007 (patch)
tree4eee9db51306426be735acc14e4ce08af88c6bc3 /test
parentUpdate README.md [AUTOGEN] (#5698) (diff)
downloadmisskey-1811725b9dec64cc3a37c1297928a75ab59fe007.tar.gz
misskey-1811725b9dec64cc3a37c1297928a75ab59fe007.tar.bz2
misskey-1811725b9dec64cc3a37c1297928a75ab59fe007.zip
ローカルタイムラインのテストを修正 (#5699)
visibility=specifiedな投稿はローカルタイムラインに流れない
Diffstat (limited to 'test')
-rw-r--r--test/streaming.ts15
1 files changed, 10 insertions, 5 deletions
diff --git a/test/streaming.ts b/test/streaming.ts
index cb962cfb3d..23d01757d0 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 => {