-
Notifications
You must be signed in to change notification settings - Fork 30k
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
test: refactor test-init.js #10384
test: refactor test-init.js #10384
Conversation
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.
LGTM with 2 suggestions
})); | ||
} | ||
|
||
{ | ||
// change CWD as we do this test so its not dependant on current CWD |
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.
typos: it’s
and dependent
(unrelated to this PR, but while you’re here… ;))
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.
Done!
} | ||
|
||
// Setup environment. Make a copy of `process.env` and add `TEST_INIT` | ||
const env = JSON.parse(JSON.stringify(process.env)); |
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.
I may be wrong but from the looks of it the copying is kind of pointless?
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.
Ack.
1. Lot of repeating code has been refactored to a function 2. Errors in async calls are properly asserted 3. Fail the test if the callbacks are not fired
68ce176
to
30b840e
Compare
Landed in bf2c49c |
1. Lot of repeating code has been refactored to a function 2. Errors in async calls are properly asserted 3. Fail the test if the callbacks are not fired PR-URL: #10384 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Julian Duque <julianduquej@gmail.com>
1. Lot of repeating code has been refactored to a function 2. Errors in async calls are properly asserted 3. Fail the test if the callbacks are not fired PR-URL: #10384 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Julian Duque <julianduquej@gmail.com>
1. Lot of repeating code has been refactored to a function 2. Errors in async calls are properly asserted 3. Fail the test if the callbacks are not fired PR-URL: #10384 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Julian Duque <julianduquej@gmail.com>
1. Lot of repeating code has been refactored to a function 2. Errors in async calls are properly asserted 3. Fail the test if the callbacks are not fired PR-URL: #10384 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Julian Duque <julianduquej@gmail.com>
1. Lot of repeating code has been refactored to a function 2. Errors in async calls are properly asserted 3. Fail the test if the callbacks are not fired PR-URL: #10384 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Julian Duque <julianduquej@gmail.com>
1. Lot of repeating code has been refactored to a function 2. Errors in async calls are properly asserted 3. Fail the test if the callbacks are not fired PR-URL: #10384 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Julian Duque <julianduquej@gmail.com>
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
test
Description of change