Skip to content

Commit 8913d62

Browse files
committed
Update mock
1 parent 19840ab commit 8913d62

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

mock.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,20 @@ export const requestNotifications = jest.fn(async (options) => ({
3939
}),
4040
}));
4141

42+
export const checkMultiple = jest.fn(async (permissions) =>
43+
permissions.reduce((acc, permission) => ({
44+
...acc,
45+
[permission]: RESULTS.GRANTED,
46+
})),
47+
);
48+
49+
export const requestMultiple = jest.fn(async (permissions) =>
50+
permissions.reduce((acc, permission) => ({
51+
...acc,
52+
[permission]: RESULTS.GRANTED,
53+
})),
54+
);
55+
4256
export default {
4357
PERMISSIONS,
4458
RESULTS,
@@ -47,4 +61,6 @@ export default {
4761
request,
4862
checkNotifications,
4963
requestNotifications,
64+
checkMultiple,
65+
requestMultiple,
5066
};

0 commit comments

Comments
 (0)