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

@ -64,7 +64,7 @@ describe('debugger module', () => {
});
await detach;
expect(w.webContents.debugger.isAttached()).to.be.false();
expect((w as any).devToolsWebContents.isDestroyed()).to.be.false();
expect(w.devToolsWebContents.isDestroyed()).to.be.false();
});
});
@ -119,9 +119,9 @@ describe('debugger module', () => {
w.webContents.debugger.sendCommand('Console.enable');
const [,, params] = await message;
w.webContents.debugger.detach();
expect((params as any).message.level).to.equal('log');
expect((params as any).message.url).to.equal(url);
expect((params as any).message.text).to.equal('a');
expect(params.message.level).to.equal('log');
expect(params.message.url).to.equal(url);
expect(params.message.text).to.equal('a');
});
it('returns error message when command fails', async () => {