diff options
Diffstat (limited to 'test/common/README.md')
-rw-r--r-- | test/common/README.md | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/test/common/README.md b/test/common/README.md index 391b753f04..664b42aca3 100644 --- a/test/common/README.md +++ b/test/common/README.md @@ -386,7 +386,7 @@ thread. The `ArrayStream` module provides a simple `Stream` that pushes elements from a given array. -<!-- eslint-disable no-undef, node-core/required-modules --> +<!-- eslint-disable no-undef, node-core/require-common-first, node-core/required-modules --> ```js const ArrayStream = require('../common/arraystream'); const stream = new ArrayStream(); @@ -402,7 +402,7 @@ require a particular action to be taken after a given number of completed tasks (for instance, shutting down an HTTP server after a specific number of requests). The Countdown will fail the test if the remainder did not reach 0. -<!-- eslint-disable strict, node-core/required-modules --> +<!-- eslint-disable strict, node-core/require-common-first, node-core/required-modules --> ```js const Countdown = require('../common/countdown'); @@ -574,7 +574,7 @@ one listed below. (`heap.validateSnapshotNodes(...)` is a shortcut for Create a heap dump and an embedder graph copy and validate occurrences. -<!-- eslint-disable no-undef, node-core/required-modules --> +<!-- eslint-disable no-undef, node-core/require-common-first, node-core/required-modules --> ```js validateSnapshotNodes('TLSWRAP', [ { @@ -592,7 +592,7 @@ validateSnapshotNodes('TLSWRAP', [ The `hijackstdio` module provides utility functions for temporarily redirecting `stdout` and `stderr` output. -<!-- eslint-disable no-undef, node-core/required-modules --> +<!-- eslint-disable no-undef, node-core/require-common-first, node-core/required-modules --> ```js const { hijackStdout, restoreStdout } = require('../common/hijackstdio'); @@ -638,7 +638,7 @@ original state after calling [`hijackstdio.hijackStdOut()`][]. The http2.js module provides a handful of utilities for creating mock HTTP/2 frames for testing of HTTP/2 endpoints -<!-- eslint-disable no-unused-vars, node-core/required-modules --> +<!-- eslint-disable no-unused-vars, node-core/require-common-first, node-core/required-modules --> ```js const http2 = require('../common/http2'); ``` @@ -648,7 +648,7 @@ const http2 = require('../common/http2'); The `http2.Frame` is a base class that creates a `Buffer` containing a serialized HTTP/2 frame header. -<!-- eslint-disable no-undef, node-core/required-modules --> +<!-- eslint-disable no-undef, node-core/require-common-first, node-core/required-modules --> ```js // length is a 24-bit unsigned integer // type is an 8-bit unsigned integer identifying the frame type @@ -667,7 +667,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. -<!-- eslint-disable no-undef, node-core/required-modules --> +<!-- eslint-disable no-undef, node-core/require-common-first, node-core/required-modules --> ```js // id is the 32-bit stream identifier // payload is a Buffer containing the DATA payload @@ -684,7 +684,7 @@ socket.write(frame.data); The `http2.HeadersFrame` is a subclass of `http2.Frame` that serializes a `HEADERS` frame. -<!-- eslint-disable no-undef, node-core/required-modules --> +<!-- eslint-disable no-undef, node-core/require-common-first, node-core/required-modules --> ```js // id is the 32-bit stream identifier // payload is a Buffer containing the HEADERS payload (see either @@ -702,7 +702,7 @@ socket.write(frame.data); The `http2.SettingsFrame` is a subclass of `http2.Frame` that serializes an empty `SETTINGS` frame. -<!-- eslint-disable no-undef, node-core/required-modules --> +<!-- eslint-disable no-undef, node-core/require-common-first, node-core/required-modules --> ```js // ack is a boolean indicating whether or not to set the ACK flag. const frame = new http2.SettingsFrame(ack); @@ -715,7 +715,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`. -<!-- eslint-disable no-undef, node-core/required-modules --> +<!-- eslint-disable no-undef, node-core/require-common-first, node-core/required-modules --> ```js const frame = new http2.HeadersFrame(1, http2.kFakeRequestHeaders, 0, true); @@ -727,7 +727,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`. -<!-- eslint-disable no-undef, node-core/required-modules --> +<!-- eslint-disable no-undef, node-core/require-common-first, node-core/required-modules --> ```js const frame = new http2.HeadersFrame(1, http2.kFakeResponseHeaders, 0, true); @@ -739,7 +739,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. -<!-- eslint-disable no-undef, node-core/required-modules --> +<!-- eslint-disable no-undef, node-core/require-common-first, node-core/required-modules --> ```js socket.write(http2.kClientMagic); ``` |