Skip to content

Commit

Permalink
add test for toString
Browse files Browse the repository at this point in the history
  • Loading branch information
IvanGoncharov committed Nov 2, 2021
1 parent 24cfc64 commit e6d4640
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,14 @@ describe('ApolloError', () => {
},
});
});

it('provides toString method', () => {
const error = new ApolloError('My original message', 'A_CODE', {
arbitrary: 'user_data',
});

expect(error.toString()).toEqual('My original message');
});
});

describe('ForbiddenError', () => {
Expand Down

0 comments on commit e6d4640

Please sign in to comment.