Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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()
},
)
before(async () => {
client = createTcpClient(Calculator.Client, {
hostName: 'localhost',
port: 8888,
})
})