How to use the google-auth-library.OAuth2Client.prototype function in google-auth-library

To help you get started, we’ve selected a few google-auth-library 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 VoxaAI / voxa / test / dialogflow / DialogflowEvent.spec.ts View on Github external
beforeEach(() => {
      voxaApp = new VoxaApp({ views, variables });
      googleAction = new GoogleAssistantPlatform(voxaApp, { clientId: "clientId" });

      const userDetailsMocked: any = _.cloneDeep(googleResponse);

      simple
        .mock(OAuth2Client.prototype, "verifySignedJwtWithCerts")
        .returnWith({
          getPayload: () => {
            return userDetailsMocked;
          },
        });
    });