Skip to content

Commit

Permalink
added exception check
Browse files Browse the repository at this point in the history
  • Loading branch information
tusharpandey13 committed Oct 8, 2024
1 parent 9d15060 commit c2baa7b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/lib/runtime.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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');
});

0 comments on commit c2baa7b

Please sign in to comment.