From e1317ce09804b92829755a8ec54dd0d48eb7ff13 Mon Sep 17 00:00:00 2001 From: syuilo Date: Mon, 17 May 2021 23:55:13 +0900 Subject: [PATCH] test --- test-d/streaming.ts | 12 ++++++++++++ test/api.ts | 4 ++++ 2 files changed, 16 insertions(+) create mode 100644 test-d/streaming.ts diff --git a/test-d/streaming.ts b/test-d/streaming.ts new file mode 100644 index 000000000..de67171ef --- /dev/null +++ b/test-d/streaming.ts @@ -0,0 +1,12 @@ +import { expectType } from 'tsd'; +import * as Misskey from '../src'; + +describe('Streaming', () => { + test('emit type', async () => { + const stream = new Misskey.Stream('https://misskey.test', { token: 'TOKEN' }); + const mainChannel = stream.useSharedConnection('main'); + mainChannel.on('notification', notification => { + expectType(notification); + }); + }); +}); diff --git a/test/api.ts b/test/api.ts index 499c133ca..038929573 100644 --- a/test/api.ts +++ b/test/api.ts @@ -44,4 +44,8 @@ describe('API', () => { body: { i: 'TOKEN' } }); }); + + // TODO: APIエラーのテスト + + // TODO: ネットワークエラーのテスト });