test: use await
to call "closeWindow" (#38166)
* test: wait for an async "closeWindow" call * fixup! test: wait for an async "closeWindow" call
This commit is contained in:
parent
ee1e6aab3e
commit
bc957e3945
2 changed files with 8 additions and 3 deletions
|
@ -4,7 +4,11 @@ import { BaseWindow, WebContentsView } from 'electron/main';
|
|||
|
||||
describe('WebContentsView', () => {
|
||||
let w: BaseWindow;
|
||||
afterEach(() => closeWindow(w as any).then(() => { w = null as unknown as BaseWindow; }));
|
||||
|
||||
afterEach(async () => {
|
||||
await closeWindow(w as any);
|
||||
w = null as unknown as BaseWindow;
|
||||
});
|
||||
|
||||
it('can be used as content view', () => {
|
||||
w = new BaseWindow({ show: false });
|
||||
|
|
|
@ -559,9 +559,10 @@ describe('chrome extensions', () => {
|
|||
});
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
afterEach(async () => {
|
||||
removeAllExtensions();
|
||||
return closeWindow(w).then(() => { w = null as unknown as BrowserWindow; });
|
||||
await closeWindow(w);
|
||||
w = null as unknown as BrowserWindow;
|
||||
});
|
||||
|
||||
it('should run content script at document_start', async () => {
|
||||
|
|
Loading…
Reference in a new issue