diff --git a/README.md b/README.md index a9ad48cd6..be599798e 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ This library supports the following tooling versions: ### Installation -Using [npm](https://npmjs.org) in your project directory run the following command: +Using [npm](https://npmjs.org) in your project directory, run the following command: ```bash npm install auth0 diff --git a/test/auth/id-token-validator.test.ts b/test/auth/id-token-validator.test.ts index 2f0a32a81..b0cc73b73 100644 --- a/test/auth/id-token-validator.test.ts +++ b/test/auth/id-token-validator.test.ts @@ -442,4 +442,15 @@ describe('id-token-validator', () => { idTokenValidator.validate(jwt, { organization: 'testOrg' }) ).resolves.not.toThrow(); }); + it('creates an instance of IdTokenValidator', async () => { + const idTokenValidator = new IDTokenValidator({ + domain: DOMAIN, + clientId: CLIENT_ID, + clientSecret: CLIENT_SECRET, + agent: {} as any, // Stub for the agent parameter, + headers: {} as any, // Stub for the headers parameter, + timeoutDuration: 5000, + }); + expect(idTokenValidator).toBeInstanceOf(IDTokenValidator); + }); }); diff --git a/test/lib/runtime.test.ts b/test/lib/runtime.test.ts index 495647212..0977d8517 100644 --- a/test/lib/runtime.test.ts +++ b/test/lib/runtime.test.ts @@ -837,3 +837,11 @@ describe('Runtime for UserInfoClient', () => { expect(request.isDone()).toBe(true); }); }); + +describe('test baseAPI', () => { + // following error is thrown: throw new Error('The provided base URL is invalid'); + // add expect statement for this error below + expect( + () => new BaseAPI({ baseUrl: {} as any, parseError: () => Promise.resolve(new Error('tmp')) }) + ).toThrowError('The provided base URL is invalid'); +});