diff --git a/test-d/streaming.ts b/test-d/streaming.ts new file mode 100644 index 0000000..de67171 --- /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 499c133..0389295 100644 --- a/test/api.ts +++ b/test/api.ts @@ -44,4 +44,8 @@ describe('API', () => { body: { i: 'TOKEN' } }); }); + + // TODO: APIエラーのテスト + + // TODO: ネットワークエラーのテスト });