Refactor test http exceptions
Reopens: https://github.com/nodejs/node/pull/17199 I had a busy schedule so i was not able to rebase and the PR was closed. The PR was approved but needed a rebase with master due to some conflicts in which i resolved in this PR.
- Refactored the test case
test-http-exceptions
to use countdown, as per issue #17169 (closed) - Added
common.mustCall
to thecountdown
callback, since the user will always want this function to be called, and it must fail if the user fails to decrease the counter to 0. - Removed explicit
common.mustCall
functions around theCountdown
callbacks in all the tests. - Add test case for
countdown
to test that a mustCall is in place. - Updated the
common.md
docs to inform thecountdown
users that the test will fail if the countdown callback was not called.
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
tests and/or benchmarks are included -
documentation is changed or added -
commit message follows commit guidelines
Affected core subsystem(s)
test