Skip to content

Commit d0dee92

Browse files
Add missing test
1 parent 62cd162 commit d0dee92

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

packages/snaps-utils/src/ui.test.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -843,15 +843,16 @@ describe('validateJsxElements', () => {
843843
<Link href="https://foo.bar">Bar</Link>
844844
</Text>
845845
</Box>,
846-
])('does not throw for a safe JSX text component', async (element) => {
846+
<Image src="https://metamask.io/foo.png" />,
847+
])('does not throw for a safe JSX component', async (element) => {
847848
const isOnPhishingList = () => false;
848849

849850
expect(() =>
850851
validateJsxElements(element, {
851852
isOnPhishingList,
852853
getSnap: jest.fn(),
853854
getAccountByAddress: jest.fn(),
854-
hasPermission: jest.fn(),
855+
hasPermission: jest.fn().mockReturnValue(true),
855856
}),
856857
).not.toThrow();
857858
});

0 commit comments

Comments
 (0)