test: use async helpers to simplify tests (#37314)

test: use async helpers to simplify the tests

Co-authored-by: Milan Burda <miburda@microsoft.com>
This commit is contained in:
Milan Burda 2023-02-17 19:32:39 +01:00 committed by GitHub
parent 0de1012280
commit ee87438d28
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 22 additions and 21 deletions

View file

@ -364,7 +364,7 @@ describe('webContents module', () => {
it('resolves when navigating within the page', async () => {
await w.loadFile(path.join(fixturesPath, 'pages', 'base-page.html'));
await new Promise(resolve => setTimeout(resolve));
await delay();
await expect(w.loadURL(w.getURL() + '#foo')).to.eventually.be.fulfilled();
});