-
Notifications
You must be signed in to change notification settings - Fork 10k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Modernize the calculateMD5
and verifyManifestFiles
test helper functions
#17367
Conversation
The test helper code largely predates the introduction of modern JavaScript features and should be refactored to improve readability. In particular callbacks and recursive function calls make the code harder to understand and maintain. This commit: - replaces the callback argument with returning a promise; - uses `const` instead of `var`; - uses arrow functions for shorter code; - uses template strings for shorter string formatting code; - improves the error messages to have more details.
The test helper code largely predates the introduction of modern JavaScript features and should be refactored to improve readability. In particular callbacks and recursive function calls make the code harder to understand and maintain. This commit: - replaces the callback argument with returning a promise; - replaces the recursive function calls with a simple loop; - uses `const`/`let` instead of `var`; - uses template strings for shorter string formatting code; - improves the error messages to have more details.
/botio unittest |
From: Bot.io (Windows)ReceivedCommand cmd_unittest from @timvandermeij received. Current queue size: 0 Live output at: http://54.193.163.58:8877/bb51634705079f5/output.txt |
From: Bot.io (Linux m4)ReceivedCommand cmd_unittest from @timvandermeij received. Current queue size: 0 Live output at: http://54.241.84.105:8877/eea6f74903c5b92/output.txt |
From: Bot.io (Linux m4)SuccessFull output at http://54.241.84.105:8877/eea6f74903c5b92/output.txt Total script time: 2.45 mins
|
From: Bot.io (Windows)SuccessFull output at http://54.193.163.58:8877/bb51634705079f5/output.txt Total script time: 9.76 mins
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is so much nicer, and more readable, without all those callbacks.
(If you have time, please continue this work for the rest of the test-code.)
r=me, thank you!
The commit messages contain more details about the individual changes. The second commit is a bit easier to review with the
?w=1
parameter.