test: convert a few more specs to async/await (#39712)
This commit is contained in:
parent
54d8402a6c
commit
f27b034045
10 changed files with 70 additions and 89 deletions
|
@ -813,15 +813,17 @@ describe('Menu module', function () {
|
|||
}).to.not.throw();
|
||||
});
|
||||
|
||||
it('should emit menu-will-show event', (done) => {
|
||||
menu.on('menu-will-show', () => { done(); });
|
||||
it('should emit menu-will-show event', async () => {
|
||||
const menuWillShow = once(menu, 'menu-will-show');
|
||||
menu.popup({ window: w });
|
||||
await menuWillShow;
|
||||
});
|
||||
|
||||
it('should emit menu-will-close event', (done) => {
|
||||
menu.on('menu-will-close', () => { done(); });
|
||||
it('should emit menu-will-close event', async () => {
|
||||
const menuWillClose = once(menu, 'menu-will-close');
|
||||
menu.popup({ window: w });
|
||||
menu.closePopup();
|
||||
await menuWillClose;
|
||||
});
|
||||
|
||||
it('returns immediately', () => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue