Skip to content

Commit

Permalink
increase coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
eduardomourar committed Oct 24, 2020
1 parent 5075e27 commit 814f5a3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion tests/lib/log-delivery.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,9 @@ describe('when delivering logs', () => {
code: 'AccessDeniedException',
})
),
on: () => {},
on: (_event: string, callback: Function) => {
callback({ httpRequest: { headers: [] } });
},
});
const msgToLog = 'How is it going?';
try {
Expand Down
4 changes: 2 additions & 2 deletions tests/lib/resource.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ describe('when getting resource', () => {
test('entrypoint uncaught exception', async () => {
const mockParseRequest = jest.spyOn<any, any>(BaseResource, 'parseRequest');
mockParseRequest.mockImplementationOnce(() => {
throw new Error('exception');
throw { message: 'exception' };
});
const resource = getResource();
const event = await resource.entrypoint({}, null);
Expand Down Expand Up @@ -642,7 +642,7 @@ describe('when getting resource', () => {
const resource = getResource();
const mockParseRequest = jest.spyOn<any, any>(resource, 'parseTestRequest');
mockParseRequest.mockImplementationOnce(() => {
throw new Error('exception');
throw { message: 'exception' };
});
const event: ProgressEvent = await resource.testEntrypoint({}, null);
expect(event.status).toBe(OperationStatus.Failed);
Expand Down

0 comments on commit 814f5a3

Please sign in to comment.