http2: fix closedCode NaN, increase test coverage
requested to merge github/fork/apapirovski/patch-http2-compat-closed-code-and-test-coverage into master
[kFinish](code)
can be triggered without passing code
. Until now, the method tried to set closedCode to undefined
resulting in NaN
closedCode instead of NGHTTP2_NO_ERROR
. Added a check for code !== undefined
before setting.
Also adds tests for closed
(request only, response covered by another PR previously) and closedCode
(both).
Adds tests for Http2ServerRequest and Http2ServerResponse Edit: separate PR now: https://github.com/nodejs/node/pull/15156setTimeout
.
Let me know if there's anything I can change. Thanks!
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
tests and/or benchmarks are included -
commit message follows commit guidelines
Affected core subsystem(s)
http2, test