test: remove a few casts to any (#39713)

This commit is contained in:
Milan Burda 2023-09-05 04:22:41 +02:00 committed by GitHub
parent c5b20eeb13
commit d76a35afe4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 29 additions and 21 deletions

View file

@ -1911,7 +1911,7 @@ describe('webContents module', () => {
it('does not crash when called via BrowserWindow', () => {
const w = new BrowserWindow({ show: false });
(w as any).setBackgroundThrottling(true);
w.setBackgroundThrottling(true);
});
it('does not crash when disallowing', () => {
@ -1946,11 +1946,11 @@ describe('webContents module', () => {
it('works via BrowserWindow', () => {
const w = new BrowserWindow({ show: false });
(w as any).setBackgroundThrottling(false);
expect((w as any).getBackgroundThrottling()).to.equal(false);
w.setBackgroundThrottling(false);
expect(w.getBackgroundThrottling()).to.equal(false);
(w as any).setBackgroundThrottling(true);
expect((w as any).getBackgroundThrottling()).to.equal(true);
w.setBackgroundThrottling(true);
expect(w.getBackgroundThrottling()).to.equal(true);
});
});