Added promises that are resolved when the menu is closed.

This is a small feature that I needed for a project that I am working on.
Here are my results; hopefully they can be useful to someone else!
Could you please change to: 'it should be rejected if the toggle closes **the nav**'