From 3bcdb3b99641e58ee4ef142ee2b2cb62ef43e894 Mon Sep 17 00:00:00 2001 From: Vse Mozhet Byt Date: Thu, 4 Jan 2018 02:18:31 +0200 Subject: [PATCH] doc: fix code nits in common/README 1. Sync comments and code 2. Fix typos PR-URL: https://github.com/nodejs/node/pull/17971 Reviewed-By: Rich Trott Reviewed-By: Khaidi Chu Reviewed-By: Jon Moss Reviewed-By: Luigi Pinca Reviewed-By: Colin Ihrig Reviewed-By: Ruben Bridgewater --- test/common/README.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/test/common/README.md b/test/common/README.md index b31b4e700e5180..1d38b591423501 100644 --- a/test/common/README.md +++ b/test/common/README.md @@ -616,7 +616,7 @@ frame. // padlen is an 8-bit integer giving the number of padding bytes to include // final is a boolean indicating whether the End-of-stream flag should be set, // defaults to false. -const data = new http2.DataFrame(id, payload, padlen, final); +const frame = new http2.DataFrame(id, payload, padlen, final); socket.write(frame.data); ``` @@ -637,8 +637,7 @@ The `http2.HeadersFrame` is a subclass of `http2.Frame` that serializes a // padlen is an 8-bit integer giving the number of padding bytes to include // final is a boolean indicating whether the End-of-stream flag should be set, // defaults to false. -const data = new http2.HeadersFrame(id, http2.kFakeRequestHeaders, - padlen, final); +const frame = new http2.HeadersFrame(id, payload, padlen, final); socket.write(frame.data); ```