test: convert a few more specs to async/await (#40313)

This commit is contained in:
Milan Burda 2023-11-17 10:44:03 +01:00 committed by GitHub
parent 471449d9f6
commit 67894f1493
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 48 additions and 61 deletions

View file

@ -29,16 +29,12 @@ describe('debugger module', () => {
expect(w.webContents.debugger.isAttached()).to.be.true();
});
it('fails when protocol version is not supported', done => {
try {
w.webContents.debugger.attach('2.0');
} catch {
expect(w.webContents.debugger.isAttached()).to.be.false();
done();
}
it('fails when protocol version is not supported', () => {
expect(() => w.webContents.debugger.attach('2.0')).to.throw();
expect(w.webContents.debugger.isAttached()).to.be.false();
});
it('attaches when no protocol version is specified', async () => {
it('attaches when no protocol version is specified', () => {
w.webContents.debugger.attach();
expect(w.webContents.debugger.isAttached()).to.be.true();
});