test: replace (webContents as any).destroy() with webContents.destroy() (#36653)
Co-authored-by: Milan Burda <miburda@microsoft.com> Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
This commit is contained in:
parent
fb461effae
commit
5fd7a43970
9 changed files with 21 additions and 21 deletions
|
@ -1552,7 +1552,7 @@ describe('webContents module', () => {
|
|||
const contents = (webContents as any).create() as WebContents;
|
||||
const originalEmit = contents.emit.bind(contents);
|
||||
contents.emit = (...args) => { return originalEmit(...args); };
|
||||
contents.once(e.name as any, () => (contents as any).destroy());
|
||||
contents.once(e.name as any, () => contents.destroy());
|
||||
const destroyed = emittedOnce(contents, 'destroyed');
|
||||
contents.loadURL(serverUrl + e.url);
|
||||
await destroyed;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue