test: convert more tests to async / await (#24373)

This commit is contained in:
Milan Burda 2020-07-01 21:14:38 +02:00 committed by GitHub
parent 3cb833821a
commit 4c449fbc75
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 116 additions and 137 deletions

View file

@ -1003,6 +1003,8 @@ describe('webContents module', () => {
defer(() => {
w2.setClosable(true);
w2.close();
protocol.unregisterProtocol(scheme);
});
await w.loadURL(`${scheme}://host3`);
@ -1015,8 +1017,6 @@ describe('webContents module', () => {
const zoomLevel2 = w2.webContents.zoomLevel;
expect(zoomLevel2).to.equal(0);
expect(zoomLevel1).to.not.equal(zoomLevel2);
protocol.unregisterProtocol(scheme);
});
it('can persist when it contains iframe', (done) => {