wdio-video-reporter
wdio-video-reporter copied to clipboard
Remove `sleep` in favor of async/await
Describe the bug Putting the process to an halt with:
const stop = new Date().getTime() + ms;
while(new Date().getTime() < stop);
is not ideal as it completely blocks everything from happening. We should replace this and all functions with proper async/await logic. I see similar implementations in all do { ... } while (...)
places.
Log n/a
To Reproduce n/a
Expected behavior
Use async/await
instead of this.
Environment (please complete the following information):
- wdio-video-reporter version: [e.g. 1.1.2]
- WebdriverIO version: [e.g. 5.4.13]
- Mode: [Standalone mode or WDIO Testrunner]
- If WDIO Testrunner, running sync/async: [e.g. sync/async]
- Node.js version: [e.g. 8.11.2]
- NPM version: [e.g. 5.8.0]
- Browser name and version: [e.g. Chrome 68]
- Platform name and version: [e.g. Windows 10]
Desktop (please complete the following information):
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]
Smartphone (please complete the following information):
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
Additional context Add any other context about the problem here.