Skip to content

Commit b9a912b

Browse files
committed
Fix snaps-sdk tests by applying @ts-expect-error annotations to deliberately invalid inputs
1 parent ee1de63 commit b9a912b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

packages/snaps-sdk/src/ui/components/image.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,12 @@ describe('image', () => {
2323
'Invalid image component: At path: value -- Value is not a valid SVG.',
2424
);
2525

26+
// @ts-expect-error - Suppressing type error to test runtime handling of invalid input
2627
expect(() => image({ value: MOCK_SVG, bar: 'baz' })).toThrow(
2728
'Invalid image component: At path: bar -- Expected a value of type `never`, but received: `"baz"`.',
2829
);
2930

31+
// @ts-expect-error - Suppressing type error to test runtime handling of invalid input
3032
expect(() => image({})).toThrow(
3133
'Invalid image component: At path: value -- Expected a string, but received: undefined.',
3234
);

0 commit comments

Comments
 (0)