import {root} from 'proto' import { connect, ServiceContext } from '../src/ServiceContext' import { HelloService } from '../src/HelloService' test('log in and say hi', async () => { let ctx = await connect("bts", "password"); expect(ctx instanceof ServiceContext).toBe(true) const hello = new HelloService(ctx) const reply = await hello.say_hello({ name: "Bob" }) expect(reply.message).toBe("hello Bob") console.log(reply.message) }, 15000); test('api_errors_updated', () => { const ResponseHeader = root.lookupType("bts.api.ResponseHeader") const rh = ResponseHeader.encode({ request_id: 42, code: 3 }).finish() const round = ResponseHeader.decode(rh) expect(round).toBeDefined() });