-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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: improve lib/internal/readline/promises.js coverage #42420
test: improve lib/internal/readline/promises.js coverage #42420
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.
I think we can remove the test
functions
@aduh95 I removed test function in response to take your suggestion, but test got following error.
When use autoCommit option, readline write to stream in callback function of process.nextTick. If we removed test function, before readline write to stream and test assertion, invocation of |
@fossamagna I suggest using |
using `await setImmediate` instead of `test` function + process.nextTick.
@aduh95 Thank you very much for your suggestion. |
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
Landed in 95f94cf |
PR-URL: nodejs#42420 Refs: https://coverage.nodejs.org/coverage-419f02ba1f00cac3/lib/internal/readline/promises.js.html Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: #42420 Refs: https://coverage.nodejs.org/coverage-419f02ba1f00cac3/lib/internal/readline/promises.js.html Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: nodejs#42420 Refs: https://coverage.nodejs.org/coverage-419f02ba1f00cac3/lib/internal/readline/promises.js.html Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Dependent of #37947 |
This improves a test coverage in
lib/internal/readline/promises.js
ref: https://coverage.nodejs.org/coverage-419f02ba1f00cac3/lib/internal/readline/promises.js.html
This validates that
autoCommit
option work correctly.