We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi! How to set permisssionLevel for notifications? I need to test this method:
export const notifyMessage = (payload): void => { const { hashId, date, messageId } = payload; chrome.notifications.getPermissionLevel((permissionLevel) => { console.log('permissionLevel: ', permissionLevel); if (permissionLevel === 'granted') { chrome.notifications.create(`${hashId}`, options, (id) => { console.log('notificationId: ', id); }); } }); };
and test:
describe('Notifications tests', () => { beforeAll(() => { global.chrome = chrome; }); it('notifyMessage', () => { notifyMessage(mockEmail); expect(chrome.notifications.getPermissionLevel.calledOnce).toBeTruthy(); }); afterAll(() => { delete global.chrome; }); });
I don`t understand why getPermissionLevel return 'denied'((( Plss help!
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi! How to set permisssionLevel for notifications?
I need to test this method:
and test:
I don`t understand why getPermissionLevel return 'denied'(((
Plss help!
The text was updated successfully, but these errors were encountered: