Skip to content

Commit 47c6c6a

Browse files
committed
test: add console error expectation for ValidationError in getUser handler
1 parent eb049cf commit 47c6c6a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

packages/event-handler/tests/unit/appsync-graphql/AppSyncGraphQLResolver.test.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -940,6 +940,11 @@ describe('Class: AppSyncGraphQLResolver', () => {
940940
expect(result).toEqual({
941941
error: 'ValidationError - Original error',
942942
});
943+
expect(console.error).toHaveBeenNthCalledWith(
944+
1,
945+
'An error occurred in handler getUser',
946+
new ValidationError('Original error')
947+
);
943948
expect(console.error).toHaveBeenNthCalledWith(
944949
2,
945950
'Exception handler for ValidationError threw an error',

0 commit comments

Comments
 (0)