test: use webContents.create() in type-safe way (#37281)
test: use (webContents as typeof ElectronInternal.WebContents).create() Co-authored-by: Milan Burda <miburda@microsoft.com>
This commit is contained in:
parent
a44e76fb70
commit
ea848bc1c5
11 changed files with 34 additions and 27 deletions
|
@ -2184,7 +2184,7 @@ describe('BrowserWindow module', () => {
|
|||
});
|
||||
|
||||
it('returns null for webContents without a BrowserWindow', () => {
|
||||
const contents = (webContents as any).create({});
|
||||
const contents = (webContents as typeof ElectronInternal.WebContents).create();
|
||||
try {
|
||||
expect(BrowserWindow.fromWebContents(contents)).to.be.null('BrowserWindow.fromWebContents(contents)');
|
||||
} finally {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue