In README.md, Promise style code is used to explain APIs.
However, async/await is better option to write asynchronous JavaScript code. The code is more flat, shorter, easy to understand and intuitive.
I remember that mocha did not support async/await when Spectron was built at first. But it supports async/await now by default. And Electron (Chromium) and Node.js supports async/await natively as you know. So there is no longer a barrier to use async/await in document.
This PR replaces Promise style code with async/await style code in the README file.
In README.md,
Promise
style code is used to explain APIs.However, async/await is better option to write asynchronous JavaScript code. The code is more flat, shorter, easy to understand and intuitive.
I remember that mocha did not support async/await when Spectron was built at first. But it supports async/await now by default. And Electron (Chromium) and Node.js supports async/await natively as you know. So there is no longer a barrier to use async/await in document.
This PR replaces Promise style code with async/await style code in the README file.