Fix for mac unit tests (#2231)
This commit is contained in:
@@ -80,6 +80,7 @@ describe('main/notifications', () => {
|
|||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
Notification.isSupported.mockImplementation(() => true);
|
Notification.isSupported.mockImplementation(() => true);
|
||||||
getFocusAssist.mockReturnValue({value: false});
|
getFocusAssist.mockReturnValue({value: false});
|
||||||
|
getDarwinDoNotDisturb.mockReturnValue(false);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should do nothing when Notification is not supported', () => {
|
it('should do nothing when Notification is not supported', () => {
|
||||||
@@ -218,6 +219,7 @@ describe('main/notifications', () => {
|
|||||||
|
|
||||||
describe('displayDownloadCompleted', () => {
|
describe('displayDownloadCompleted', () => {
|
||||||
it('should open file when clicked', () => {
|
it('should open file when clicked', () => {
|
||||||
|
getDarwinDoNotDisturb.mockReturnValue(false);
|
||||||
localizeMessage.mockReturnValue('test_filename');
|
localizeMessage.mockReturnValue('test_filename');
|
||||||
displayDownloadCompleted(
|
displayDownloadCompleted(
|
||||||
'test_filename',
|
'test_filename',
|
||||||
|
Reference in New Issue
Block a user