Skip to content

Commit

Permalink
use ts-expect-error
Browse files Browse the repository at this point in the history
  • Loading branch information
jcger committed Oct 14, 2024
1 parent 048f2ee commit cfd1017
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,10 @@ describe('validate unmuteAll parameters', () => {

it('should throw Boom.badRequest for invalid params', async () => {
const invalidParams = {
id: 22 as unknown as string, // type workaround to send wrong data validation
id: 22,
};

// @ts-expect-error wrong type for testing purposes
await expect(unmuteAll(context, invalidParams)).rejects.toThrowErrorMatchingInlineSnapshot(
`"Error validating unmute all parameters - [id]: expected value of type [string] but got [number]"`
);
Expand Down

0 comments on commit cfd1017

Please sign in to comment.