test: fix app.dock for corrected type (#46110)

test: fix app.dock for corrected type
This commit is contained in:
Shelley Vohr
2025-03-18 22:44:39 +01:00
committed by GitHub
parent 71f3ff6bf2
commit dcbab692c0
3 changed files with 28 additions and 27 deletions

View File

@@ -2499,12 +2499,12 @@ describe('BrowserWindow module', () => {
it('sets the progress', () => {
expect(() => {
if (process.platform === 'darwin') {
app.dock.setIcon(path.join(fixtures, 'assets', 'logo.png'));
app.dock?.setIcon(path.join(fixtures, 'assets', 'logo.png'));
}
w.setProgressBar(0.5);
if (process.platform === 'darwin') {
app.dock.setIcon(null as any);
app.dock?.setIcon(null as any);
}
w.setProgressBar(-1);
}).to.not.throw();