How to use the @creditkarma/thrift-client.createTcpClient function in @creditkarma/thrift-client

To help you get started, we’ve selected a few @creditkarma/thrift-client examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github creditkarma / thrift-server / packages / thrift-integration / src / client / connections / index.spec.ts View on Github external
it('should reject for a request to a missing service', async () => {
            const badClient: Calculator.Client = createTcpClient<
                Calculator.Client
            >(Calculator.Client, {
                hostName: 'fakehost',
                port: 8888,
            })

            return badClient.add(5, 7).then(
                (response: number) => {
                    console.log('res: ', response)
                    throw new Error('Should reject with host not found')
                },
                (err: any) => {
                    console.log('err: ', err)
                    expect(err).to.exist()
                },
            )
github creditkarma / thrift-server / packages / thrift-integration / src / client / connections / index.spec.ts View on Github external
before(async () => {
            client = createTcpClient(Calculator.Client, {
                hostName: 'localhost',
                port: 8888,
            })
        })