test: improve lib/internal/readline/promises.js coverage#42420
test: improve lib/internal/readline/promises.js coverage#42420nodejs-github-bot merged 6 commits intonodejs:masterfrom
Conversation
aduh95
left a comment
There was a problem hiding this comment.
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.jsref: https://coverage.nodejs.org/coverage-419f02ba1f00cac3/lib/internal/readline/promises.js.html
This validates that
autoCommitoption work correctly.