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:
parent
0de1012280
commit
ee87438d28
9 changed files with 22 additions and 21 deletions
|
@ -291,7 +291,7 @@ describe('session module', () => {
|
|||
expect(itemUrl).to.equal(url);
|
||||
expect(itemFilename).to.equal('mockFile.txt');
|
||||
// Delay till the next tick.
|
||||
await new Promise<void>(resolve => setImmediate(() => resolve()));
|
||||
await new Promise(setImmediate);
|
||||
expect(() => item.getURL()).to.throw('DownloadItem used after being destroyed');
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue