-
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-repl-sigint #11309
Conversation
* remove debugging code that prints child stdout * indexOf() -> includes() * improved messages on assertion failures
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 if CI is happy.
assert.notStrictEqual(stdout.indexOf('42042\n'), -1); | ||
assert.ok( | ||
stdout.includes('Script execution interrupted.\n'), | ||
`Expected stdout to contain "Script execution interrupted.", got ${stdout}` |
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.
Nit: \n
is missing in the expected string.
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 left it out because a literal \n
in the message output would probably be unhelpful and an escaped \n
might be taken to mean that an escaped \n
is what is expected.
I'm OK with any of the three possibilities (leave it out, put it in literally, put it in escaped). I chose this one (leave it out) for simplicity. If you feel that it should be there, let me know if you want it escaped or not. And if, like me, you don't feel particularly strongly, then I'll probably just leave it as it is. ¯\(ツ)/¯
* remove debugging code that prints child stdout * indexOf() -> includes() * improved messages on assertion failures PR-URL: #11309 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Landed in f2023d7 |
* remove debugging code that prints child stdout * indexOf() -> includes() * improved messages on assertion failures PR-URL: nodejs#11309 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
* remove debugging code that prints child stdout * indexOf() -> includes() * improved messages on assertion failures PR-URL: #11309 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Needs a backport PR to land on v4 |
* remove debugging code that prints child stdout * indexOf() -> includes() * improved messages on assertion failures PR-URL: #11309 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
test repl