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

test: fix app.dock for corrected type

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
This commit is contained in:
trop[bot] 2025-03-20 13:45:47 -05:00 committed by GitHub
parent 5f48031c24
commit a6fe725dab
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 28 additions and 27 deletions

View file

@ -2498,12 +2498,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();