Fix for mac unit tests (#2231)

This commit is contained in:
Devin Binnie 2022-08-19 00:10:12 -04:00 committed by GitHub
parent 7fbbb217f5
commit 455d0c334a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -80,6 +80,7 @@ describe('main/notifications', () => {
beforeEach(() => {
Notification.isSupported.mockImplementation(() => true);
getFocusAssist.mockReturnValue({value: false});
getDarwinDoNotDisturb.mockReturnValue(false);
});
it('should do nothing when Notification is not supported', () => {
@ -218,6 +219,7 @@ describe('main/notifications', () => {
describe('displayDownloadCompleted', () => {
it('should open file when clicked', () => {
getDarwinDoNotDisturb.mockReturnValue(false);
localizeMessage.mockReturnValue('test_filename');
displayDownloadCompleted(
'test_filename',