| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
This is just a nit but the current implementation requires checking the code coverage to confirm that the test is succeeding (the test will never fail, even if the caching is removed). A simple change could be to store the local settings and remote settings that are returned from the first call and then confirming that the objects that are retrieved the 2nd time are one and the same (strictEqual). const localSettings = stream.session.localSettings;
const remoteSettings = stream.session.remoteSettings;
assertSettings(localSettings);
assertSettings(remoteSettings);
// Test that stored settings are returned when called for second time
assert.strictEqual(stream.session.localSettings, localSettings);
assert.strictEqual(stream.session.remoteSettings, remoteSettings); |
Sorry, something went wrong.
|
@apapirovski Thanks for the comment 👍 |
Sorry, something went wrong.
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM
Sorry, something went wrong.
Refs: #14985 PR-URL: nodejs/node#15751 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
| Back | FazBrowse Home | New Git URL |
This PR adds test to confirm that stored settings are returned when they're available in Http2Stream
It covers following lines:
node/lib/internal/http2/core.js
Lines 805 to 806 in 2f8ddb2
node/lib/internal/http2/core.js
Lines 820 to 821 in 2f8ddb2
Refs: #14985
Checklist
Affected core subsystem(s)
test, http2