electron-userland / spectron

DEPRECATED: 🔎 Test Electron apps using ChromeDriver
http://electronjs.org/spectron
MIT License
1.68k stars 229 forks source link

doc: use async-await to explain APIs in README #1032

Closed rhysd closed 2 years ago

rhysd commented 2 years ago

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.