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:
Milan Burda 2023-02-16 15:41:41 +01:00 committed by GitHub
parent a44e76fb70
commit ea848bc1c5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 34 additions and 27 deletions

View file

@ -41,7 +41,7 @@ describe('BrowserView module', () => {
});
it('can be created with an existing webContents', async () => {
const wc = (webContents as any).create({ sandbox: true });
const wc = (webContents as typeof ElectronInternal.WebContents).create({ sandbox: true });
await wc.loadURL('about:blank');
view = new BrowserView({ webContents: wc } as any);