chore: Prefer async functions
Since the codebase already uses async/await and requires node 14+, it might as well use async/await instead of then for Promises
By using async/await we can reduce the indentation levels, which generally makes the code easier to understand.
If refactoring like this is welcome, then I will expand on this PR to tidy up the test file and the source file it tests. Future PRs can tidy up other file pairs.
@mroderick Hey, refactoring is always welcome. Thank you for all the PRs you made recently. They are all valuable.
@mroderick Hey, refactoring is always welcome. Thank you for all the PRs you made recently. They are all valuable.
OK, then I'll add more to this PR. Setting it back to draft :)