Skip to content

Commit 0a47e49

Browse files
committed
update snap permission list test with mock store
1 parent c387e6e commit 0a47e49

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

ui/components/app/snaps/snap-permissions-list/snap-permissions-list.test.js

+22
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,35 @@ describe('Snap Permission List', () => {
2121
subjectType: 'snap',
2222
version: '0.2.2',
2323
};
24+
const mockStore = {
25+
metamask: {
26+
subjectMetadata: {
27+
'npm:@metamask/notifications-example-snap': {
28+
name: 'Notifications Example Snap',
29+
version: '1.2.3',
30+
subjectType: 'snap',
31+
},
32+
},
33+
snaps: {
34+
'npm:@metamask/notifications-example-snap': {
35+
id: 'npm:@metamask/notifications-example-snap',
36+
version: '1.2.3',
37+
manifest: {
38+
proposedName: 'Notifications Example Snap',
39+
description: 'A snap',
40+
},
41+
},
42+
},
43+
},
44+
};
2445

2546
it('renders permissions list for snaps', () => {
2647
renderWithProvider(
2748
<SnapPermissionsList
2849
permissions={mockPermissionData}
2950
targetSubjectMetadata={mockTargetSubjectMetadata}
3051
/>,
52+
mockStore,
3153
);
3254
expect(
3355
screen.getByText('Display dialog windows in MetaMask.'),

0 commit comments

Comments
 (0)