-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: use consts, async/await, etc in rollingcache spec
- basically using pre-defined fixture vars instead of ones defined inside the test - which is more straightforward, easier to read, and less fragile - shorter names too - left a couple of ones as is where they were only used once very quickly -- could make them fixture vars too but 🤷 - use async/await instead of Promises with `done()` etc - also use more `fs-extra` functions that support Promises instead of synchronous `fs` functions (e.g. `existsSync` -> `pathExists`) - async should be a small optimization for tests too - fix: use __temp dir for auto-generated files instead of creating them in a fixtures dir and breaking actual fixtures - format: a few multi-line statements were able to be condensed to a single line, so do so - esp as multi-line was not helping readability since this is just irrelevant test data (may have hampered readability actually)
- Loading branch information
Showing
1 changed file
with
41 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters