As part of improving code coverage for http2 in #14985, I wrote some unit tests for socket operations in #16211
I noticed that:
- socketOnResume returns this.pause() if this._paused is true
|
if (this._paused) |
|
return this.pause(); |
- if this._paused is true, it's set to false in socketOnDrain
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?
Reactions are currently unavailable
As part of improving code coverage for http2 in #14985, I wrote some unit tests for socket operations in #16211
I noticed that:
node/lib/internal/http2/core.js
Lines 2180 to 2181 in 411695e
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?