import {client} from '..'; import {expect} from 'chai'; import {Response} from "./typings/fetch"; describe('typings', () => { it('create a client and call to get comment', async() => { const fakeFetch = async(url: string, options: object): Promise => ({ status: 200, async json(): Promise { return { comment: { commentId: 'comment-id', comment: { text: { content: 'Hello' }, mentions: [] }, replies: { count: 0, comments: [] }, reactions: { count: 0 } } }; } }); const c = client({ signedInstance: 'signed', contextToken: 'token', fetch: fakeFetch }); expect(c).to.exist; const result = await c.get({ commentId: 'comment-id' }); expect(result.commentId).to.exist; }); });