mirror of
https://github.com/electron/electron.git
synced 2026-01-09 15:38:08 -05:00
test: ensure all webContents are closed
This commit is contained in:
@@ -9,7 +9,11 @@ import { defer, ifdescribe, waitUntil } from './lib/spec-helpers';
|
||||
import { closeAllWindows } from './lib/window-helpers';
|
||||
|
||||
describe('WebContentsView', () => {
|
||||
afterEach(closeAllWindows);
|
||||
afterEach(async () => {
|
||||
await closeAllWindows();
|
||||
const existingWCS = webContents.getAllWebContents();
|
||||
existingWCS.forEach((contents) => contents.close());
|
||||
});
|
||||
|
||||
it('can be instantiated with no arguments', () => {
|
||||
// eslint-disable-next-line no-new
|
||||
|
||||
Reference in New Issue
Block a user