diff --git a/types/hapi__nes/lib/client.d.ts b/types/hapi__nes/lib/client.d.ts index 4155971c19..6b900697c6 100644 --- a/types/hapi__nes/lib/client.d.ts +++ b/types/hapi__nes/lib/client.d.ts @@ -22,6 +22,7 @@ declare class Client { unsubscribe(path: string, handler?: Client.Handler): Promise; subscriptions(): string[]; overrideReconnectionAuth(auth: any): void; + reauthenticate(auth: any): Promise; } declare namespace Client { diff --git a/types/hapi__nes/test/route-authentication-client.ts b/types/hapi__nes/test/route-authentication-client.ts index df6a57aeab..e401d05562 100644 --- a/types/hapi__nes/test/route-authentication-client.ts +++ b/types/hapi__nes/test/route-authentication-client.ts @@ -15,5 +15,8 @@ import NesClient = require('@hapi/nes/lib/client'); var client = new NesClient.Client('ws://localhost'); client.connect({ auth: { headers: { authorization: 'Basic am9objpzZWNyZXQ=' } } }).then(() => { + return client.reauthenticate({ headers: { authorization: 'Bearer am9objpzZWNyZXQ=' } }); +}).then(() => { + return client.request('hello'); });