Closed
Description
As part of improving code coverage for http2 in #14985, I wrote some unit tests for socket operations in #16211
I noticed that:
socketOnResume
returnsthis.pause()
ifthis._paused
is truenode/lib/internal/http2/core.js
Lines 2180 to 2181 in 411695e
- if
this._paused
is true, it's set to false insocketOnDrain
node/lib/internal/http2/core.js
Line 2198 in 411695e
However, I didn't find any code which sets socket._paused to true https://github.com/nodejs/node/search?utf8=%E2%9C%93&q=_paused&type=
Is this a bug? Or is there a way to mock value of socket._paused
while testing?