diff --git a/test/parallel/test-http2-session-settings.js b/test/parallel/test-http2-session-settings.js index 7f54bc2f02dcc8..4570d23ad38a15 100644 --- a/test/parallel/test-http2-session-settings.js +++ b/test/parallel/test-http2-session-settings.js @@ -23,8 +23,14 @@ function assertSettings(settings) { function onStream(stream, headers, flags) { - assertSettings(stream.session.localSettings); - assertSettings(stream.session.remoteSettings); + 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); stream.respond({ 'content-type': 'text/html',