From 940457394a58dbe89d25c68fc347bba3b7ed9ea4 Mon Sep 17 00:00:00 2001 From: Vse Mozhet Byt Date: Thu, 4 Jan 2018 02:08:49 +0200 Subject: [PATCH] doc: compact eslint directives in common/README Backport-PR-URL: https://github.com/nodejs/node/pull/20456 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 | 40 ++++++++-------------------------------- 1 file changed, 8 insertions(+), 32 deletions(-) diff --git a/test/common/README.md b/test/common/README.md index 17ded3526bdf7f..fad4467775ac32 100644 --- a/test/common/README.md +++ b/test/common/README.md @@ -509,10 +509,7 @@ Returns the result of The http2.js module provides a handful of utilities for creating mock HTTP/2 frames for testing of HTTP/2 endpoints - - - - + ```js const http2 = require('../common/http2'); ``` @@ -522,10 +519,7 @@ const http2 = require('../common/http2'); The `http2.Frame` is a base class that creates a `Buffer` containing a serialized HTTP/2 frame header. - - - - + ```js // length is a 24-bit unsigned integer // type is an 8-bit unsigned integer identifying the frame type @@ -544,10 +538,7 @@ The serialized `Buffer` may be retrieved using the `frame.data` property. The `http2.DataFrame` is a subclass of `http2.Frame` that serializes a `DATA` frame. - - - - + ```js // id is the 32-bit stream identifier // payload is a Buffer containing the DATA payload @@ -564,10 +555,7 @@ socket.write(frame.data); The `http2.HeadersFrame` is a subclass of `http2.Frame` that serializes a `HEADERS` frame. - - - - + ```js // id is the 32-bit stream identifier // payload is a Buffer containing the HEADERS payload (see either @@ -585,10 +573,7 @@ socket.write(frame.data); The `http2.SettingsFrame` is a subclass of `http2.Frame` that serializes an empty `SETTINGS` frame. - - - - + ```js // ack is a boolean indicating whether or not to set the ACK flag. const frame = new http2.SettingsFrame(ack); @@ -601,10 +586,7 @@ socket.write(frame.data); Set to a `Buffer` instance that contains a minimal set of serialized HTTP/2 request headers to be used as the payload of a `http2.HeadersFrame`. - - - - + ```js const frame = new http2.HeadersFrame(1, http2.kFakeRequestHeaders, 0, true); @@ -616,10 +598,7 @@ socket.write(frame.data); Set to a `Buffer` instance that contains a minimal set of serialized HTTP/2 response headers to be used as the payload a `http2.HeadersFrame`. - - - - + ```js const frame = new http2.HeadersFrame(1, http2.kFakeResponseHeaders, 0, true); @@ -631,10 +610,7 @@ socket.write(frame.data); Set to a `Buffer` containing the preamble bytes an HTTP/2 client must send upon initial establishment of a connection. - - - - + ```js socket.write(http2.kClientMagic); ```