mirror of
https://github.com/misskey-dev/misskey.git
synced 2024-12-30 23:09:19 +09:00
test
This commit is contained in:
parent
a385bd0227
commit
e1317ce098
12
test-d/streaming.ts
Normal file
12
test-d/streaming.ts
Normal file
@ -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<Misskey.entities.Notification>(notification);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
@ -44,4 +44,8 @@ describe('API', () => {
|
|||||||
body: { i: 'TOKEN' }
|
body: { i: 'TOKEN' }
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// TODO: APIエラーのテスト
|
||||||
|
|
||||||
|
// TODO: ネットワークエラーのテスト
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user