From 6a356aff1380e79d67738c5b43aa2b5fee76600d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Tue, 11 Jun 2024 12:41:44 +0100 Subject: [PATCH] chore: sync up Node.js test files for v20.11.1 (#24066) Co-authored-by: Yoshiya Hinosawa --- ext/node/polyfills/_fs/_fs_read.ts | 4 - ext/node/polyfills/_fs/_fs_write.mjs | 6 +- ext/node/polyfills/_fs/_fs_writeFile.ts | 20 +- ext/node/polyfills/_stream.mjs | 23 +- ext/node/polyfills/internal/buffer.mjs | 31 ++- ext/node/polyfills/internal/cli_table.ts | 5 +- ext/node/polyfills/internal/fs/utils.mjs | 31 +-- ext/node/polyfills/internal/validators.mjs | 15 +- ext/node/polyfills/path/_util.ts | 6 +- ext/node/polyfills/url.ts | 28 ++- tests/node_compat/.gitignore | 1 + tests/node_compat/config.jsonc | 4 +- tests/node_compat/runner/TODO.md | 222 +++++++++++++++--- tests/node_compat/runner/suite | 2 +- tests/node_compat/test.ts | 2 +- .../node_compat/test/common/child_process.js | 106 ++++++++- tests/node_compat/test/common/index.js | 33 +++ tests/node_compat/test/common/index.mjs | 164 ++++++------- tests/node_compat/test/common/tmpdir.js | 39 ++- .../test/internet/test-dns-lookup.js | 4 +- .../test-buffer-no-negative-allocation.js | 3 +- .../parallel/test-buffer-over-max-length.js | 13 +- .../test/parallel/test-buffer-slice.js | 4 +- .../test/parallel/test-buffer-slow.js | 3 +- .../test-buffer-tostring-rangeerror.js | 18 +- .../test/parallel/test-console-table.js | 130 +++++----- .../test-diagnostics-channel-pub-sub.js | 7 + .../test-event-emitter-emit-context.js | 2 +- .../test-event-emitter-error-monitor.js | 2 +- .../test/parallel/test-file-write-stream.js | 3 +- .../test/parallel/test-file-write-stream2.js | 3 +- .../test/parallel/test-file-write-stream3.js | 3 +- .../test/parallel/test-file-write-stream4.js | 3 +- .../test/parallel/test-fs-access.js | 39 ++- .../test/parallel/test-fs-append-file-sync.js | 11 +- .../test/parallel/test-fs-copyfile.js | 3 +- .../test/parallel/test-fs-open-flags.js | 3 +- .../test/parallel/test-fs-open-mode-mask.js | 5 +- .../parallel/test-fs-open-numeric-flags.js | 3 +- .../parallel/test-fs-read-stream-autoClose.js | 3 +- .../test/parallel/test-fs-read-stream-fd.js | 3 +- .../parallel/test-fs-read-stream-inherit.js | 18 +- .../node_compat/test/parallel/test-fs-read.js | 2 +- .../test/parallel/test-fs-readv-sync.js | 3 +- .../test/parallel/test-fs-readv.js | 3 +- ...fs-rmdir-recursive-sync-warns-not-found.js | 3 +- ...t-fs-rmdir-recursive-sync-warns-on-file.js | 3 +- ...est-fs-rmdir-recursive-throws-not-found.js | 7 +- .../test-fs-rmdir-recursive-throws-on-file.js | 7 +- ...test-fs-rmdir-recursive-warns-not-found.js | 3 +- .../test-fs-rmdir-recursive-warns-on-file.js | 3 +- .../test/parallel/test-fs-watchfile.js | 8 +- .../test/parallel/test-fs-write-buffer.js | 17 +- .../parallel/test-fs-write-file-buffer.js | 3 +- .../test-fs-write-file-invalid-path.js | 5 +- .../test/parallel/test-fs-write-file-sync.js | 53 +++-- .../test-fs-write-stream-autoclose-option.js | 3 +- ...-fs-write-stream-close-without-callback.js | 3 +- .../test-fs-write-stream-double-close.js | 7 +- .../test/parallel/test-fs-write-stream-end.js | 7 +- .../test/parallel/test-fs-write-stream-fs.js | 5 +- .../test-fs-write-stream-throw-type-error.js | 3 +- .../test/parallel/test-fs-write-stream.js | 3 +- .../test/parallel/test-fs-write-sync.js | 3 +- .../test/parallel/test-fs-write.js | 40 ++-- .../test/parallel/test-fs-writev-sync.js | 3 +- .../test/parallel/test-http-agent-getname.js | 3 +- ...tp-outgoing-internal-headernames-getter.js | 2 +- ....parse-only-support-http-https-protocol.js | 4 +- .../test/parallel/test-net-isipv4.js | 8 +- .../test/parallel/test-net-isipv6.js | 8 +- .../test/parallel/test-parse-args.mjs | 6 +- .../test/parallel/test-path-extname.js | 29 +-- .../test/parallel/test-path-parse-format.js | 4 + tests/node_compat/test/parallel/test-path.js | 8 +- .../test/parallel/test-readline-keys.js | 4 +- .../test/parallel/test-stream-buffer-list.js | 91 ------- .../parallel/test-stream-readable-destroy.js | 2 +- .../test/parallel/test-stream-uint8array.js | 2 +- .../test-stream-writable-decoded-encoding.js | 47 ++++ .../test-stream-writable-end-cb-error.js | 2 +- .../test-stream2-readable-from-list.js | 108 --------- .../test/parallel/test-stream2-writable.js | 11 +- .../test/parallel/test-url-format-whatwg.js | 5 + .../parallel/test-url-parse-invalid-input.js | 30 +++ .../test/parallel/test-url-parse-query.js | 2 +- .../test/parallel/test-url-pathtofileurl.js | 37 ++- .../test/parallel/test-url-relative.js | 25 +- ...vents-add-event-listener-options-signal.js | 9 + 89 files changed, 953 insertions(+), 719 deletions(-) create mode 100644 tests/node_compat/.gitignore delete mode 100644 tests/node_compat/test/parallel/test-stream-buffer-list.js delete mode 100644 tests/node_compat/test/parallel/test-stream2-readable-from-list.js diff --git a/ext/node/polyfills/_fs/_fs_read.ts b/ext/node/polyfills/_fs/_fs_read.ts index cf0c5e51dd..e25f41e764 100644 --- a/ext/node/polyfills/_fs/_fs_read.ts +++ b/ext/node/polyfills/_fs/_fs_read.ts @@ -88,10 +88,6 @@ export function read( if ( !(opt.buffer instanceof Buffer) && !(opt.buffer instanceof Uint8Array) ) { - if (opt.buffer === null) { - // @ts-ignore: Intentionally create TypeError for passing test-fs-read.js#L87 - length = opt.buffer.byteLength; - } throw new ERR_INVALID_ARG_TYPE("buffer", [ "Buffer", "TypedArray", diff --git a/ext/node/polyfills/_fs/_fs_write.mjs b/ext/node/polyfills/_fs/_fs_write.mjs index aa23805bf3..1ad6ac492a 100644 --- a/ext/node/polyfills/_fs/_fs_write.mjs +++ b/ext/node/polyfills/_fs/_fs_write.mjs @@ -13,7 +13,6 @@ import * as io from "ext:deno_io/12_io.js"; import * as fs from "ext:deno_fs/30_fs.js"; import { getValidatedFd, - showStringCoercionDeprecation, validateOffsetLengthWrite, validateStringAfterArrayBufferView, } from "ext:deno_node/internal/fs/utils.mjs"; @@ -114,9 +113,6 @@ export function write(fd, buffer, offset, length, position, callback) { // `fs.write(fd, string[, position[, encoding]], callback)` validateStringAfterArrayBufferView(buffer, "buffer"); - if (typeof buffer !== "string") { - showStringCoercionDeprecation(); - } if (typeof position !== "function") { if (typeof offset === "function") { @@ -128,7 +124,7 @@ export function write(fd, buffer, offset, length, position, callback) { length = "utf-8"; } - const str = String(buffer); + const str = buffer; validateEncoding(str, length); callback = maybeCallback(position); buffer = Buffer.from(str, length); diff --git a/ext/node/polyfills/_fs/_fs_writeFile.ts b/ext/node/polyfills/_fs/_fs_writeFile.ts index 60b31897ec..f0014c36d2 100644 --- a/ext/node/polyfills/_fs/_fs_writeFile.ts +++ b/ext/node/polyfills/_fs/_fs_writeFile.ts @@ -20,7 +20,6 @@ import { denoErrorToNodeError, } from "ext:deno_node/internal/errors.ts"; import { - showStringCoercionDeprecation, validateStringAfterArrayBufferView, } from "ext:deno_node/internal/fs/utils.mjs"; import { promisify } from "ext:deno_node/internal/util.mjs"; @@ -32,8 +31,7 @@ interface Writer { export function writeFile( pathOrRid: string | number | URL, - // deno-lint-ignore ban-types - data: string | Uint8Array | Object, + data: string | Uint8Array, optOrCallback: Encodings | CallbackWithError | WriteFileOptions | undefined, callback?: CallbackWithError, ) { @@ -61,10 +59,7 @@ export function writeFile( if (!ArrayBuffer.isView(data)) { validateStringAfterArrayBufferView(data, "data"); - if (typeof data !== "string") { - showStringCoercionDeprecation(); - } - data = Buffer.from(String(data), encoding); + data = Buffer.from(data, encoding); } const isRid = typeof pathOrRid === "number"; @@ -101,15 +96,13 @@ export function writeFile( export const writeFilePromise = promisify(writeFile) as ( pathOrRid: string | number | URL, - // deno-lint-ignore ban-types - data: string | Uint8Array | Object, + data: string | Uint8Array, options?: Encodings | WriteFileOptions, ) => Promise; export function writeFileSync( pathOrRid: string | number | URL, - // deno-lint-ignore ban-types - data: string | Uint8Array | Object, + data: string | Uint8Array, options?: Encodings | WriteFileOptions, ) { pathOrRid = pathOrRid instanceof URL ? pathFromURL(pathOrRid) : pathOrRid; @@ -127,10 +120,7 @@ export function writeFileSync( if (!ArrayBuffer.isView(data)) { validateStringAfterArrayBufferView(data, "data"); - if (typeof data !== "string") { - showStringCoercionDeprecation(); - } - data = Buffer.from(String(data), encoding); + data = Buffer.from(data, encoding); } const isRid = typeof pathOrRid === "number"; diff --git a/ext/node/polyfills/_stream.mjs b/ext/node/polyfills/_stream.mjs index 591f8bb512..075705e00f 100644 --- a/ext/node/polyfills/_stream.mjs +++ b/ext/node/polyfills/_stream.mjs @@ -3754,7 +3754,14 @@ var require_writable = __commonJS({ this.destroyed = false; const noDecode = !!(options && options.decodeStrings === false); this.decodeStrings = !noDecode; - this.defaultEncoding = options && options.defaultEncoding || "utf8"; + const defaultEncoding = options?.defaultEncoding; + if (defaultEncoding == null) { + this.defaultEncoding = 'utf8'; + } else if (Buffer2.isEncoding(defaultEncoding)) { + this.defaultEncoding = defaultEncoding; + } else { + throw new ERR_UNKNOWN_ENCODING(defaultEncoding); + } this.length = 0; this.writing = false; this.corked = 0; @@ -3845,10 +3852,12 @@ var require_writable = __commonJS({ const state = stream._writableState; if (typeof encoding === "function") { cb = encoding; - encoding = state.defaultEncoding; + // Simulates https://github.com/nodejs/node/commit/dbed0319ac438dcbd6e92483f3280b1dc6767e00 + encoding = state.objectMode ? undefined : state.defaultEncoding; } else { if (!encoding) { - encoding = state.defaultEncoding; + // Simulates https://github.com/nodejs/node/commit/dbed0319ac438dcbd6e92483f3280b1dc6767e00 + encoding = state.objectMode ? undefined : state.defaultEncoding; } else if (encoding !== "buffer" && !Buffer2.isEncoding(encoding)) { throw new ERR_UNKNOWN_ENCODING(encoding); } @@ -4031,7 +4040,7 @@ var require_writable = __commonJS({ } while (count-- > 0) { state.pendingcb--; - cb(); + cb(null); } if (state.destroyed) { errorBuffer(state); @@ -4158,8 +4167,10 @@ var require_writable = __commonJS({ err = new ERR_STREAM_DESTROYED("end"); } if (typeof cb === "function") { - if (err || state.finished) { + if (err) { process.nextTick(cb, err); + } else if (state.finished) { + process.nextTick(cb, null); } else { state[kOnFinished].push(cb); } @@ -4246,7 +4257,7 @@ var require_writable = __commonJS({ state.finished = true; const onfinishCallbacks = state[kOnFinished].splice(0); for (let i = 0; i < onfinishCallbacks.length; i++) { - onfinishCallbacks[i](); + onfinishCallbacks[i](null); } stream.emit("finish"); if (state.autoDestroy) { diff --git a/ext/node/polyfills/internal/buffer.mjs b/ext/node/polyfills/internal/buffer.mjs index 0521c56aaa..a051965a39 100644 --- a/ext/node/polyfills/internal/buffer.mjs +++ b/ext/node/polyfills/internal/buffer.mjs @@ -32,7 +32,7 @@ import { import { normalizeEncoding } from "ext:deno_node/internal/util.mjs"; import { validateBuffer } from "ext:deno_node/internal/validators.mjs"; import { isUint8Array } from "ext:deno_node/internal/util/types.ts"; -import { ERR_INVALID_STATE } from "ext:deno_node/internal/errors.ts"; +import { ERR_INVALID_STATE, NodeError } from "ext:deno_node/internal/errors.ts"; import { forgivingBase64Encode, forgivingBase64UrlEncode, @@ -167,10 +167,7 @@ Object.setPrototypeOf(Buffer.prototype, Uint8Array.prototype); Object.setPrototypeOf(Buffer, Uint8Array); function assertSize(size) { - validateNumber(size, "size"); - if (!(size >= 0 && size <= kMaxLength)) { - throw new codes.ERR_INVALID_ARG_VALUE.RangeError("size", size); - } + validateNumber(size, "size", 0, kMaxLength); } function _alloc(size, fill, encoding) { @@ -852,7 +849,14 @@ function _base64Slice(buf, start, end) { const decoder = new TextDecoder(); function _utf8Slice(buf, start, end) { - return decoder.decode(buf.slice(start, end)); + try { + return decoder.decode(buf.slice(start, end)); + } catch (err) { + if (err instanceof TypeError) { + throw new NodeError("ERR_STRING_TOO_LONG", "String too long"); + } + throw err; + } } function _latin1Slice(buf, start, end) { @@ -2297,10 +2301,23 @@ export function boundsError(value, length, type) { ); } -export function validateNumber(value, name) { +export function validateNumber(value, name, min = undefined, max) { if (typeof value !== "number") { throw new codes.ERR_INVALID_ARG_TYPE(name, "number", value); } + + if ( + (min != null && value < min) || (max != null && value > max) || + ((min != null || max != null) && Number.isNaN(value)) + ) { + throw new codes.ERR_OUT_OF_RANGE( + name, + `${min != null ? `>= ${min}` : ""}${ + min != null && max != null ? " && " : "" + }${max != null ? `<= ${max}` : ""}`, + value, + ); + } } function checkInt(value, min, max, buf, offset, byteLength) { diff --git a/ext/node/polyfills/internal/cli_table.ts b/ext/node/polyfills/internal/cli_table.ts index 574081ba42..9826e524f6 100644 --- a/ext/node/polyfills/internal/cli_table.ts +++ b/ext/node/polyfills/internal/cli_table.ts @@ -27,11 +27,10 @@ const renderRow = (row: string[], columnWidths: number[]) => { for (let i = 0; i < row.length; i++) { const cell = row[i]; const len = getStringWidth(cell); - const needed = (columnWidths[i] - len) / 2; + const needed = columnWidths[i] - len; // round(needed) + ceil(needed) will always add up to the amount // of spaces we need while also left justifying the output. - out += " ".repeat(needed) + cell + - " ".repeat(Math.ceil(needed)); + out += cell + " ".repeat(Math.ceil(needed)); if (i !== row.length - 1) { out += tableChars.middle; } diff --git a/ext/node/polyfills/internal/fs/utils.mjs b/ext/node/polyfills/internal/fs/utils.mjs index a1823bb328..ec379ed99a 100644 --- a/ext/node/polyfills/internal/fs/utils.mjs +++ b/ext/node/polyfills/internal/fs/utils.mjs @@ -23,7 +23,6 @@ import { isUint8Array, } from "ext:deno_node/internal/util/types.ts"; import { once } from "ext:deno_node/internal/util.mjs"; -import { deprecate } from "node:util"; import { toPathIfFileURL } from "ext:deno_node/internal/url.ts"; import { validateAbortSignal, @@ -959,24 +958,13 @@ export const getValidMode = hideStackFrames((mode, type) => { export const validateStringAfterArrayBufferView = hideStackFrames( (buffer, name) => { - if (typeof buffer === "string") { - return; + if (typeof buffer !== "string") { + throw new ERR_INVALID_ARG_TYPE( + name, + ["string", "Buffer", "TypedArray", "DataView"], + buffer, + ); } - - if ( - typeof buffer === "object" && - buffer !== null && - typeof buffer.toString === "function" && - Object.prototype.hasOwnProperty.call(buffer, "toString") - ) { - return; - } - - throw new ERR_INVALID_ARG_TYPE( - name, - ["string", "Buffer", "TypedArray", "DataView"], - buffer, - ); }, ); @@ -1005,12 +993,6 @@ export const constants = { kWriteFileMaxChunkSize, }; -export const showStringCoercionDeprecation = deprecate( - () => {}, - "Implicit coercion of objects with own toString property is deprecated.", - "DEP0162", -); - export default { constants, assertEncoding, @@ -1030,7 +1012,6 @@ export default { preprocessSymlinkDestination, realpathCacheKey, getStatsFromBinding, - showStringCoercionDeprecation, stringToFlags, stringToSymlinkType, Stats, diff --git a/ext/node/polyfills/internal/validators.mjs b/ext/node/polyfills/internal/validators.mjs index d4cd955462..58b1a97d74 100644 --- a/ext/node/polyfills/internal/validators.mjs +++ b/ext/node/polyfills/internal/validators.mjs @@ -171,10 +171,23 @@ function validateString(value, name) { * @param {unknown} value * @param {string} name */ -function validateNumber(value, name) { +function validateNumber(value, name, min = undefined, max) { if (typeof value !== "number") { throw new codes.ERR_INVALID_ARG_TYPE(name, "number", value); } + + if ( + (min != null && value < min) || (max != null && value > max) || + ((min != null || max != null) && Number.isNaN(value)) + ) { + throw new codes.ERR_OUT_OF_RANGE( + name, + `${min != null ? `>= ${min}` : ""}${ + min != null && max != null ? " && " : "" + }${max != null ? `<= ${max}` : ""}`, + value, + ); + } } /** diff --git a/ext/node/polyfills/path/_util.ts b/ext/node/polyfills/path/_util.ts index 7be4829653..9248c68ae5 100644 --- a/ext/node/polyfills/path/_util.ts +++ b/ext/node/polyfills/path/_util.ts @@ -106,13 +106,17 @@ export function normalizeString( return res; } +function formatExt(ext) { + return ext ? `${ext[0] === "." ? "" : "."}${ext}` : ""; +} + export function _format( sep: string, pathObject: FormatInputPathObject, ): string { const dir: string | undefined = pathObject.dir || pathObject.root; const base: string = pathObject.base || - (pathObject.name || "") + (pathObject.ext || ""); + (pathObject.name || "") + formatExt(pathObject.ext); if (!dir) return base; if (dir === pathObject.root) return dir + base; return dir + sep + base; diff --git a/ext/node/polyfills/url.ts b/ext/node/polyfills/url.ts index 6633334ba5..4eeb0381f6 100644 --- a/ext/node/polyfills/url.ts +++ b/ext/node/polyfills/url.ts @@ -1352,12 +1352,16 @@ function getPathFromURLPosix(url: URL): string { * setter. * - TAB: The tab character is also stripped out by the `pathname` setter. */ -function encodePathChars(filepath: string): string { +function encodePathChars( + filepath: string, + options: { windows?: boolean }, +): string { + const windows = options.windows; if (filepath.includes("%")) { filepath = filepath.replace(percentRegEx, "%25"); } // In posix, backslash is a valid character in paths: - if (!isWindows && filepath.includes("\\")) { + if (!(windows ?? isWindows) && filepath.includes("\\")) { filepath = filepath.replace(backslashRegEx, "%5C"); } if (filepath.includes("\n")) { @@ -1376,11 +1380,17 @@ function encodePathChars(filepath: string): string { * This function ensures that `filepath` is resolved absolutely, and that the URL control characters are correctly encoded when converting into a File URL. * @see Tested in `parallel/test-url-pathtofileurl.js`. * @param filepath The file path string to convert to a file URL. + * @param options The options. * @returns The file URL object. */ -export function pathToFileURL(filepath: string): URL { +export function pathToFileURL( + filepath: string, + options: { windows?: boolean } = {}, +): URL { + validateString(filepath, "path"); + const windows = options?.windows; const outURL = new URL("file://"); - if (isWindows && filepath.startsWith("\\\\")) { + if ((windows ?? isWindows) && filepath.startsWith("\\\\")) { // UNC path format: \\server\share\resource const paths = filepath.split("\\"); if (paths.length <= 3) { @@ -1400,20 +1410,22 @@ export function pathToFileURL(filepath: string): URL { } outURL.hostname = idnaToASCII(hostname); - outURL.pathname = encodePathChars(paths.slice(3).join("/")); + outURL.pathname = encodePathChars(paths.slice(3).join("/"), { windows }); } else { - let resolved = path.resolve(filepath); + let resolved = (windows ?? isWindows) + ? path.win32.resolve(filepath) + : path.posix.resolve(filepath); // path.resolve strips trailing slashes so we must add them back const filePathLast = filepath.charCodeAt(filepath.length - 1); if ( (filePathLast === CHAR_FORWARD_SLASH || - (isWindows && filePathLast === CHAR_BACKWARD_SLASH)) && + ((windows ?? isWindows) && filePathLast === CHAR_BACKWARD_SLASH)) && resolved[resolved.length - 1] !== path.sep ) { resolved += "/"; } - outURL.pathname = encodePathChars(resolved); + outURL.pathname = encodePathChars(resolved, { windows }); } return outURL; } diff --git a/tests/node_compat/.gitignore b/tests/node_compat/.gitignore new file mode 100644 index 0000000000..e8961f70fd --- /dev/null +++ b/tests/node_compat/.gitignore @@ -0,0 +1 @@ +test/.tmp.* diff --git a/tests/node_compat/config.jsonc b/tests/node_compat/config.jsonc index 9729507dd0..612c5558a7 100644 --- a/tests/node_compat/config.jsonc +++ b/tests/node_compat/config.jsonc @@ -75,7 +75,6 @@ "test-fs-read-stream.js", "test-fs-rmdir-recursive.js", "test-fs-write-file.js", - "test-fs-write.js", "test-http-url.parse-https.request.js", "test-net-better-error-messages-path.js", "test-net-connect-buffer.js", @@ -94,6 +93,7 @@ "test-stdin-from-file-spawn.js", "test-stream-duplex-from.js", "test-ttywrap-invalid-fd.js", + "test-url-parse-invalid-input.js", "test-url-urltooptions.js", "test-util-format.js", "test-util-inspect-namespace.js", @@ -482,7 +482,6 @@ "test-stream-backpressure.js", "test-stream-big-packet.js", "test-stream-big-push.js", - "test-stream-buffer-list.js", "test-stream-construct.js", "test-stream-destroy-event-order.js", "test-stream-duplex-destroy.js", @@ -603,7 +602,6 @@ "test-stream2-push.js", "test-stream2-read-sync-stack.js", "test-stream2-readable-empty-buffer-no-eof.js", - "test-stream2-readable-from-list.js", "test-stream2-readable-legacy-drain.js", "test-stream2-readable-non-empty-end.js", "test-stream2-readable-wrap-destroy.js", diff --git a/tests/node_compat/runner/TODO.md b/tests/node_compat/runner/TODO.md index 0bc19a0766..ebd6f192f0 100644 --- a/tests/node_compat/runner/TODO.md +++ b/tests/node_compat/runner/TODO.md @@ -13,6 +13,7 @@ NOTE: This file should not be manually edited. Please edit `tests/node_compat/co - [abort/test-signal-handler.js](https://github.com/nodejs/node/tree/v18.12.1/test/abort/test-signal-handler.js) - [abort/test-worker-abort-uncaught-exception.js](https://github.com/nodejs/node/tree/v18.12.1/test/abort/test-worker-abort-uncaught-exception.js) - [abort/test-zlib-invalid-internals-usage.js](https://github.com/nodejs/node/tree/v18.12.1/test/abort/test-zlib-invalid-internals-usage.js) +- [benchmark/test-bechmark-readline.js](https://github.com/nodejs/node/tree/v18.12.1/test/benchmark/test-bechmark-readline.js) - [benchmark/test-benchmark-assert.js](https://github.com/nodejs/node/tree/v18.12.1/test/benchmark/test-benchmark-assert.js) - [benchmark/test-benchmark-async-hooks.js](https://github.com/nodejs/node/tree/v18.12.1/test/benchmark/test-benchmark-async-hooks.js) - [benchmark/test-benchmark-blob.js](https://github.com/nodejs/node/tree/v18.12.1/test/benchmark/test-benchmark-blob.js) @@ -29,6 +30,7 @@ NOTE: This file should not be manually edited. Please edit `tests/node_compat/co - [benchmark/test-benchmark-fs.js](https://github.com/nodejs/node/tree/v18.12.1/test/benchmark/test-benchmark-fs.js) - [benchmark/test-benchmark-http.js](https://github.com/nodejs/node/tree/v18.12.1/test/benchmark/test-benchmark-http.js) - [benchmark/test-benchmark-http2.js](https://github.com/nodejs/node/tree/v18.12.1/test/benchmark/test-benchmark-http2.js) +- [benchmark/test-benchmark-mime.js](https://github.com/nodejs/node/tree/v18.12.1/test/benchmark/test-benchmark-mime.js) - [benchmark/test-benchmark-misc.js](https://github.com/nodejs/node/tree/v18.12.1/test/benchmark/test-benchmark-misc.js) - [benchmark/test-benchmark-module.js](https://github.com/nodejs/node/tree/v18.12.1/test/benchmark/test-benchmark-module.js) - [benchmark/test-benchmark-napi.js](https://github.com/nodejs/node/tree/v18.12.1/test/benchmark/test-benchmark-napi.js) @@ -45,28 +47,35 @@ NOTE: This file should not be manually edited. Please edit `tests/node_compat/co - [benchmark/test-benchmark-url.js](https://github.com/nodejs/node/tree/v18.12.1/test/benchmark/test-benchmark-url.js) - [benchmark/test-benchmark-util.js](https://github.com/nodejs/node/tree/v18.12.1/test/benchmark/test-benchmark-util.js) - [benchmark/test-benchmark-v8.js](https://github.com/nodejs/node/tree/v18.12.1/test/benchmark/test-benchmark-v8.js) +- [benchmark/test-benchmark-validators.js](https://github.com/nodejs/node/tree/v18.12.1/test/benchmark/test-benchmark-validators.js) - [benchmark/test-benchmark-vm.js](https://github.com/nodejs/node/tree/v18.12.1/test/benchmark/test-benchmark-vm.js) - [benchmark/test-benchmark-webstreams.js](https://github.com/nodejs/node/tree/v18.12.1/test/benchmark/test-benchmark-webstreams.js) - [benchmark/test-benchmark-worker.js](https://github.com/nodejs/node/tree/v18.12.1/test/benchmark/test-benchmark-worker.js) - [benchmark/test-benchmark-zlib.js](https://github.com/nodejs/node/tree/v18.12.1/test/benchmark/test-benchmark-zlib.js) - [es-module/test-cjs-esm-warn.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-cjs-esm-warn.js) +- [es-module/test-cjs-legacyMainResolve-permission.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-cjs-legacyMainResolve-permission.js) +- [es-module/test-cjs-legacyMainResolve.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-cjs-legacyMainResolve.js) - [es-module/test-cjs-prototype-pollution.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-cjs-prototype-pollution.js) +- [es-module/test-dynamic-import-script-lifetime.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-dynamic-import-script-lifetime.js) - [es-module/test-esm-assertionless-json-import.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-esm-assertionless-json-import.js) - [es-module/test-esm-cjs-builtins.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-esm-cjs-builtins.js) - [es-module/test-esm-cjs-exports.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-esm-cjs-exports.js) - [es-module/test-esm-cjs-main.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-esm-cjs-main.js) - [es-module/test-esm-data-urls.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-esm-data-urls.js) -- [es-module/test-esm-dynamic-import-assertion.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-esm-dynamic-import-assertion.js) +- [es-module/test-esm-dynamic-import-attribute.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-esm-dynamic-import-attribute.js) +- [es-module/test-esm-dynamic-import-commonjs.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-esm-dynamic-import-commonjs.js) +- [es-module/test-esm-dynamic-import-mutating-fs.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-esm-dynamic-import-mutating-fs.js) - [es-module/test-esm-dynamic-import.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-esm-dynamic-import.js) - [es-module/test-esm-encoded-path-native.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-esm-encoded-path-native.js) - [es-module/test-esm-error-cache.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-esm-error-cache.js) -- [es-module/test-esm-import-assertion-errors.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-esm-import-assertion-errors.js) -- [es-module/test-esm-import-assertion-validation.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-esm-import-assertion-validation.js) +- [es-module/test-esm-import-attributes-errors.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-esm-import-attributes-errors.js) +- [es-module/test-esm-import-attributes-validation.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-esm-import-attributes-validation.js) - [es-module/test-esm-invalid-data-urls.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-esm-invalid-data-urls.js) - [es-module/test-esm-invalid-pjson.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-esm-invalid-pjson.js) - [es-module/test-esm-loader-cache-clearing.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-esm-loader-cache-clearing.js) - [es-module/test-esm-loader-modulemap.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-esm-loader-modulemap.js) - [es-module/test-esm-loader-search.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-esm-loader-search.js) +- [es-module/test-esm-named-exports.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-esm-named-exports.js) - [es-module/test-esm-preserve-symlinks-main.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-esm-preserve-symlinks-main.js) - [es-module/test-esm-preserve-symlinks.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-esm-preserve-symlinks.js) - [es-module/test-esm-repl-imports.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-esm-repl-imports.js) @@ -74,11 +83,20 @@ NOTE: This file should not be manually edited. Please edit `tests/node_compat/co - [es-module/test-esm-symlink-main.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-esm-symlink-main.js) - [es-module/test-esm-symlink-type.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-esm-symlink-type.js) - [es-module/test-esm-symlink.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-esm-symlink.js) -- [es-module/test-esm-type-flag-errors.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-esm-type-flag-errors.js) +- [es-module/test-esm-type-field-errors.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-esm-type-field-errors.js) - [es-module/test-esm-undefined-cjs-global-like-variables.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-esm-undefined-cjs-global-like-variables.js) -- [es-module/test-esm-unknown-or-no-extension.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-esm-unknown-or-no-extension.js) +- [es-module/test-esm-unknown-extension.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-esm-unknown-extension.js) +- [es-module/test-esm-url-extname.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-esm-url-extname.js) - [es-module/test-esm-windows.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-esm-windows.js) - [es-module/test-loaders-hidden-from-users.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-loaders-hidden-from-users.js) +- [es-module/test-vm-compile-function-leak.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-vm-compile-function-leak.js) +- [es-module/test-vm-compile-function-lineoffset.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-vm-compile-function-lineoffset.js) +- [es-module/test-vm-contextified-script-leak.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-vm-contextified-script-leak.js) +- [es-module/test-vm-source-text-module-leak.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-vm-source-text-module-leak.js) +- [es-module/test-vm-synthetic-module-leak.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-vm-synthetic-module-leak.js) +- [es-module/test-wasm-memory-out-of-bound.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-wasm-memory-out-of-bound.js) +- [es-module/test-wasm-simple.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-wasm-simple.js) +- [es-module/test-wasm-web-api.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-wasm-web-api.js) - [internet/test-corepack-yarn-install.js](https://github.com/nodejs/node/tree/v18.12.1/test/internet/test-corepack-yarn-install.js) - [internet/test-dgram-broadcast-multi-process.js](https://github.com/nodejs/node/tree/v18.12.1/test/internet/test-dgram-broadcast-multi-process.js) - [internet/test-dgram-connect.js](https://github.com/nodejs/node/tree/v18.12.1/test/internet/test-dgram-connect.js) @@ -95,22 +113,24 @@ NOTE: This file should not be manually edited. Please edit `tests/node_compat/co - [internet/test-https-autoselectfamily-slow-timeout.js](https://github.com/nodejs/node/tree/v18.12.1/test/internet/test-https-autoselectfamily-slow-timeout.js) - [internet/test-https-issue-43963.js](https://github.com/nodejs/node/tree/v18.12.1/test/internet/test-https-issue-43963.js) - [internet/test-inspector-help-page.js](https://github.com/nodejs/node/tree/v18.12.1/test/internet/test-inspector-help-page.js) +- [internet/test-net-autoselectfamily-timeout-close.js](https://github.com/nodejs/node/tree/v18.12.1/test/internet/test-net-autoselectfamily-timeout-close.js) - [internet/test-net-connect-timeout.js](https://github.com/nodejs/node/tree/v18.12.1/test/internet/test-net-connect-timeout.js) - [internet/test-net-connect-unref.js](https://github.com/nodejs/node/tree/v18.12.1/test/internet/test-net-connect-unref.js) - [internet/test-snapshot-dns-lookup.js](https://github.com/nodejs/node/tree/v18.12.1/test/internet/test-snapshot-dns-lookup.js) - [internet/test-snapshot-dns-resolve.js](https://github.com/nodejs/node/tree/v18.12.1/test/internet/test-snapshot-dns-resolve.js) - [internet/test-tls-add-ca-cert.js](https://github.com/nodejs/node/tree/v18.12.1/test/internet/test-tls-add-ca-cert.js) +- [internet/test-tls-autoselectfamily-backing-socket.js](https://github.com/nodejs/node/tree/v18.12.1/test/internet/test-tls-autoselectfamily-backing-socket.js) - [internet/test-tls-autoselectfamily-servername.js](https://github.com/nodejs/node/tree/v18.12.1/test/internet/test-tls-autoselectfamily-servername.js) - [internet/test-trace-events-dns.js](https://github.com/nodejs/node/tree/v18.12.1/test/internet/test-trace-events-dns.js) - [internet/test-uv-threadpool-schedule.js](https://github.com/nodejs/node/tree/v18.12.1/test/internet/test-uv-threadpool-schedule.js) +- [known_issues/test-cli-print-var-crypto.js](https://github.com/nodejs/node/tree/v18.12.1/test/known_issues/test-cli-print-var-crypto.js) - [known_issues/test-cwd-enoent-file.js](https://github.com/nodejs/node/tree/v18.12.1/test/known_issues/test-cwd-enoent-file.js) - [known_issues/test-dgram-bind-shared-ports-after-port-0.js](https://github.com/nodejs/node/tree/v18.12.1/test/known_issues/test-dgram-bind-shared-ports-after-port-0.js) - [known_issues/test-fs-writeFileSync-invalid-windows.js](https://github.com/nodejs/node/tree/v18.12.1/test/known_issues/test-fs-writeFileSync-invalid-windows.js) - [known_issues/test-http-path-contains-unicode.js](https://github.com/nodejs/node/tree/v18.12.1/test/known_issues/test-http-path-contains-unicode.js) -- [known_issues/test-http2-trailers-after-session-close.js](https://github.com/nodejs/node/tree/v18.12.1/test/known_issues/test-http2-trailers-after-session-close.js) - [known_issues/test-inspector-cluster-port-clash.js](https://github.com/nodejs/node/tree/v18.12.1/test/known_issues/test-inspector-cluster-port-clash.js) +- [known_issues/test-permission-model-path-resolution.js](https://github.com/nodejs/node/tree/v18.12.1/test/known_issues/test-permission-model-path-resolution.js) - [known_issues/test-repl-require-context.js](https://github.com/nodejs/node/tree/v18.12.1/test/known_issues/test-repl-require-context.js) -- [known_issues/test-shadow-realm-gc.js](https://github.com/nodejs/node/tree/v18.12.1/test/known_issues/test-shadow-realm-gc.js) - [known_issues/test-stdin-is-always-net.socket.js](https://github.com/nodejs/node/tree/v18.12.1/test/known_issues/test-stdin-is-always-net.socket.js) - [known_issues/test-stream-writable-sync-error.js](https://github.com/nodejs/node/tree/v18.12.1/test/known_issues/test-stream-writable-sync-error.js) - [known_issues/test-url-parse-conformance.js](https://github.com/nodejs/node/tree/v18.12.1/test/known_issues/test-url-parse-conformance.js) @@ -121,31 +141,14 @@ NOTE: This file should not be manually edited. Please edit `tests/node_compat/co - [known_issues/test-vm-timeout-escape-nexttick.js](https://github.com/nodejs/node/tree/v18.12.1/test/known_issues/test-vm-timeout-escape-nexttick.js) - [known_issues/test-vm-timeout-escape-queuemicrotask.js](https://github.com/nodejs/node/tree/v18.12.1/test/known_issues/test-vm-timeout-escape-queuemicrotask.js) - [message/assert_throws_stack.js](https://github.com/nodejs/node/tree/v18.12.1/test/message/assert_throws_stack.js) -- [message/core_line_numbers.js](https://github.com/nodejs/node/tree/v18.12.1/test/message/core_line_numbers.js) - [message/eval_messages.js](https://github.com/nodejs/node/tree/v18.12.1/test/message/eval_messages.js) -- [message/if-error-has-good-stack.js](https://github.com/nodejs/node/tree/v18.12.1/test/message/if-error-has-good-stack.js) - [message/internal_assert.js](https://github.com/nodejs/node/tree/v18.12.1/test/message/internal_assert.js) - [message/internal_assert_fail.js](https://github.com/nodejs/node/tree/v18.12.1/test/message/internal_assert_fail.js) - [message/max_tick_depth.js](https://github.com/nodejs/node/tree/v18.12.1/test/message/max_tick_depth.js) - [message/nexttick_throw.js](https://github.com/nodejs/node/tree/v18.12.1/test/message/nexttick_throw.js) -- [message/promise_unhandled_warn_with_error.js](https://github.com/nodejs/node/tree/v18.12.1/test/message/promise_unhandled_warn_with_error.js) -- [message/source_map_enclosing_function.js](https://github.com/nodejs/node/tree/v18.12.1/test/message/source_map_enclosing_function.js) -- [message/source_map_reference_error_tabs.js](https://github.com/nodejs/node/tree/v18.12.1/test/message/source_map_reference_error_tabs.js) -- [message/source_map_sourcemapping_url_string.js](https://github.com/nodejs/node/tree/v18.12.1/test/message/source_map_sourcemapping_url_string.js) -- [message/source_map_throw_catch.js](https://github.com/nodejs/node/tree/v18.12.1/test/message/source_map_throw_catch.js) -- [message/source_map_throw_icu.js](https://github.com/nodejs/node/tree/v18.12.1/test/message/source_map_throw_icu.js) -- [message/source_map_throw_set_immediate.js](https://github.com/nodejs/node/tree/v18.12.1/test/message/source_map_throw_set_immediate.js) - [message/stdin_messages.js](https://github.com/nodejs/node/tree/v18.12.1/test/message/stdin_messages.js) -- [message/test-no-extra-info-on-fatal-exception.js](https://github.com/nodejs/node/tree/v18.12.1/test/message/test-no-extra-info-on-fatal-exception.js) -- [message/throw_error_with_getter_throw.js](https://github.com/nodejs/node/tree/v18.12.1/test/message/throw_error_with_getter_throw.js) -- [message/throw_null.js](https://github.com/nodejs/node/tree/v18.12.1/test/message/throw_null.js) -- [message/throw_undefined.js](https://github.com/nodejs/node/tree/v18.12.1/test/message/throw_undefined.js) -- [message/timeout_throw.js](https://github.com/nodejs/node/tree/v18.12.1/test/message/timeout_throw.js) -- [message/undefined_reference_in_new_context.js](https://github.com/nodejs/node/tree/v18.12.1/test/message/undefined_reference_in_new_context.js) -- [message/unhandled_promise_trace_warnings.js](https://github.com/nodejs/node/tree/v18.12.1/test/message/unhandled_promise_trace_warnings.js) - [message/util-inspect-error-cause.js](https://github.com/nodejs/node/tree/v18.12.1/test/message/util-inspect-error-cause.js) - [message/util_inspect_error.js](https://github.com/nodejs/node/tree/v18.12.1/test/message/util_inspect_error.js) -- [message/v8_warning.js](https://github.com/nodejs/node/tree/v18.12.1/test/message/v8_warning.js) - [parallel/test-abortcontroller.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-abortcontroller.js) - [parallel/test-aborted-util.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-aborted-util.js) - [parallel/test-abortsignal-cloneable.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-abortsignal-cloneable.js) @@ -158,6 +161,7 @@ NOTE: This file should not be manually edited. Please edit `tests/node_compat/co - [parallel/test-assert-calltracker-verify.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-assert-calltracker-verify.js) - [parallel/test-assert-checktag.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-assert-checktag.js) - [parallel/test-assert-deep.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-assert-deep.js) +- [parallel/test-assert-esm-cjs-message-verify.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-assert-esm-cjs-message-verify.js) - [parallel/test-assert-fail-deprecation.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-assert-fail-deprecation.js) - [parallel/test-assert-first-line.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-assert-first-line.js) - [parallel/test-assert-if-error.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-assert-if-error.js) @@ -215,6 +219,7 @@ NOTE: This file should not be manually edited. Please edit `tests/node_compat/co - [parallel/test-binding-constants.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-binding-constants.js) - [parallel/test-blob-buffer-too-large.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-blob-buffer-too-large.js) - [parallel/test-blob-createobjecturl.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-blob-createobjecturl.js) +- [parallel/test-blob-file-backed.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-blob-file-backed.js) - [parallel/test-blob.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-blob.js) - [parallel/test-blocklist-clone.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-blocklist-clone.js) - [parallel/test-blocklist.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-blocklist.js) @@ -230,6 +235,7 @@ NOTE: This file should not be manually edited. Please edit `tests/node_compat/co - [parallel/test-buffer-pending-deprecation.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-buffer-pending-deprecation.js) - [parallel/test-buffer-pool-untransferable.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-buffer-pool-untransferable.js) - [parallel/test-buffer-prototype-inspect.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-buffer-prototype-inspect.js) +- [parallel/test-buffer-set-inspect-max-bytes.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-buffer-set-inspect-max-bytes.js) - [parallel/test-buffer-sharedarraybuffer.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-buffer-sharedarraybuffer.js) - [parallel/test-buffer-write.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-buffer-write.js) - [parallel/test-c-ares.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-c-ares.js) @@ -323,6 +329,8 @@ NOTE: This file should not be manually edited. Please edit `tests/node_compat/co - [parallel/test-cli-node-print-help.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cli-node-print-help.js) - [parallel/test-cli-options-negation.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cli-options-negation.js) - [parallel/test-cli-options-precedence.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cli-options-precedence.js) +- [parallel/test-cli-permission-deny-fs.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cli-permission-deny-fs.js) +- [parallel/test-cli-permission-multiple-allow.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cli-permission-multiple-allow.js) - [parallel/test-cli-syntax-eval.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cli-syntax-eval.js) - [parallel/test-cli-syntax-piped-bad.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cli-syntax-piped-bad.js) - [parallel/test-cli-syntax-piped-good.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cli-syntax-piped-good.js) @@ -432,7 +440,6 @@ NOTE: This file should not be manually edited. Please edit `tests/node_compat/co - [parallel/test-crypto-async-sign-verify.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-async-sign-verify.js) - [parallel/test-crypto-authenticated-stream.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-authenticated-stream.js) - [parallel/test-crypto-authenticated.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-authenticated.js) -- [parallel/test-crypto-binary-default.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-binary-default.js) - [parallel/test-crypto-certificate.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-certificate.js) - [parallel/test-crypto-cipher-decipher.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-cipher-decipher.js) - [parallel/test-crypto-cipheriv-decipheriv.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-cipheriv-decipheriv.js) @@ -440,6 +447,9 @@ NOTE: This file should not be manually edited. Please edit `tests/node_compat/co - [parallel/test-crypto-des3-wrap.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-des3-wrap.js) - [parallel/test-crypto-dh-constructor.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-dh-constructor.js) - [parallel/test-crypto-dh-curves.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-dh-curves.js) +- [parallel/test-crypto-dh-errors.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-dh-errors.js) +- [parallel/test-crypto-dh-generate-keys.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-dh-generate-keys.js) +- [parallel/test-crypto-dh-group-setters.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-dh-group-setters.js) - [parallel/test-crypto-dh-leak.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-dh-leak.js) - [parallel/test-crypto-dh-modp2-views.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-dh-modp2-views.js) - [parallel/test-crypto-dh-modp2.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-dh-modp2.js) @@ -458,10 +468,41 @@ NOTE: This file should not be manually edited. Please edit `tests/node_compat/co - [parallel/test-crypto-hash.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-hash.js) - [parallel/test-crypto-key-objects-messageport.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-key-objects-messageport.js) - [parallel/test-crypto-key-objects.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-key-objects.js) +- [parallel/test-crypto-keygen-async-dsa-key-object.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-keygen-async-dsa-key-object.js) +- [parallel/test-crypto-keygen-async-dsa.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-keygen-async-dsa.js) +- [parallel/test-crypto-keygen-async-elliptic-curve-jwk-ec.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-keygen-async-elliptic-curve-jwk-ec.js) +- [parallel/test-crypto-keygen-async-elliptic-curve-jwk-rsa.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-keygen-async-elliptic-curve-jwk-rsa.js) +- [parallel/test-crypto-keygen-async-elliptic-curve-jwk.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-keygen-async-elliptic-curve-jwk.js) +- [parallel/test-crypto-keygen-async-encrypted-private-key-der.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-keygen-async-encrypted-private-key-der.js) +- [parallel/test-crypto-keygen-async-encrypted-private-key.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-keygen-async-encrypted-private-key.js) +- [parallel/test-crypto-keygen-async-explicit-elliptic-curve-encrypted-p256.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-keygen-async-explicit-elliptic-curve-encrypted-p256.js) +- [parallel/test-crypto-keygen-async-explicit-elliptic-curve-encrypted.js.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-keygen-async-explicit-elliptic-curve-encrypted.js.js) +- [parallel/test-crypto-keygen-async-explicit-elliptic-curve.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-keygen-async-explicit-elliptic-curve.js) +- [parallel/test-crypto-keygen-async-named-elliptic-curve-encrypted-p256.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-keygen-async-named-elliptic-curve-encrypted-p256.js) +- [parallel/test-crypto-keygen-async-named-elliptic-curve-encrypted.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-keygen-async-named-elliptic-curve-encrypted.js) +- [parallel/test-crypto-keygen-async-named-elliptic-curve.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-keygen-async-named-elliptic-curve.js) +- [parallel/test-crypto-keygen-async-rsa.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-keygen-async-rsa.js) +- [parallel/test-crypto-keygen-bit-length.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-keygen-bit-length.js) - [parallel/test-crypto-keygen-deprecation.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-keygen-deprecation.js) +- [parallel/test-crypto-keygen-dh-classic.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-keygen-dh-classic.js) +- [parallel/test-crypto-keygen-duplicate-deprecated-option.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-keygen-duplicate-deprecated-option.js) +- [parallel/test-crypto-keygen-eddsa.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-keygen-eddsa.js) +- [parallel/test-crypto-keygen-empty-passphrase-no-error.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-keygen-empty-passphrase-no-error.js) +- [parallel/test-crypto-keygen-empty-passphrase-no-prompt.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-keygen-empty-passphrase-no-prompt.js) +- [parallel/test-crypto-keygen-invalid-parameter-encoding-dsa.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-keygen-invalid-parameter-encoding-dsa.js) +- [parallel/test-crypto-keygen-invalid-parameter-encoding-ec.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-keygen-invalid-parameter-encoding-ec.js) +- [parallel/test-crypto-keygen-key-object-without-encoding.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-keygen-key-object-without-encoding.js) +- [parallel/test-crypto-keygen-key-objects.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-keygen-key-objects.js) +- [parallel/test-crypto-keygen-missing-oid.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-keygen-missing-oid.js) +- [parallel/test-crypto-keygen-no-rsassa-pss-params.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-keygen-no-rsassa-pss-params.js) +- [parallel/test-crypto-keygen-non-standard-public-exponent.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-keygen-non-standard-public-exponent.js) +- [parallel/test-crypto-keygen-promisify.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-keygen-promisify.js) +- [parallel/test-crypto-keygen-rfc8017-9-1.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-keygen-rfc8017-9-1.js) +- [parallel/test-crypto-keygen-rfc8017-a-2-3.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-keygen-rfc8017-a-2-3.js) +- [parallel/test-crypto-keygen-rsa-pss.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-keygen-rsa-pss.js) +- [parallel/test-crypto-keygen-sync.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-keygen-sync.js) - [parallel/test-crypto-keygen.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-keygen.js) - [parallel/test-crypto-lazy-transform-writable.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-lazy-transform-writable.js) -- [parallel/test-crypto-modp1-error.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-modp1-error.js) - [parallel/test-crypto-no-algorithm.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-no-algorithm.js) - [parallel/test-crypto-op-during-process-exit.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-op-during-process-exit.js) - [parallel/test-crypto-padding-aes256.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-padding-aes256.js) @@ -473,6 +514,7 @@ NOTE: This file should not be manually edited. Please edit `tests/node_compat/co - [parallel/test-crypto-random.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-random.js) - [parallel/test-crypto-randomfillsync-regression.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-randomfillsync-regression.js) - [parallel/test-crypto-randomuuid.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-randomuuid.js) +- [parallel/test-crypto-rsa-dsa-revert.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-rsa-dsa-revert.js) - [parallel/test-crypto-rsa-dsa.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-rsa-dsa.js) - [parallel/test-crypto-scrypt.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-scrypt.js) - [parallel/test-crypto-secure-heap.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-secure-heap.js) @@ -582,11 +624,23 @@ NOTE: This file should not be manually edited. Please edit `tests/node_compat/co - [parallel/test-dgram-udp6-send-default-host.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-udp6-send-default-host.js) - [parallel/test-dgram-unref-in-cluster.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-unref-in-cluster.js) - [parallel/test-dgram-unref.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-unref.js) +- [parallel/test-diagnostics-channel-bind-store.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-diagnostics-channel-bind-store.js) - [parallel/test-diagnostics-channel-http-server-start.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-diagnostics-channel-http-server-start.js) - [parallel/test-diagnostics-channel-http.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-diagnostics-channel-http.js) - [parallel/test-diagnostics-channel-memory-leak.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-diagnostics-channel-memory-leak.js) - [parallel/test-diagnostics-channel-net.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-diagnostics-channel-net.js) +- [parallel/test-diagnostics-channel-process.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-diagnostics-channel-process.js) - [parallel/test-diagnostics-channel-safe-subscriber-errors.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-diagnostics-channel-safe-subscriber-errors.js) +- [parallel/test-diagnostics-channel-sync-unsubscribe.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-diagnostics-channel-sync-unsubscribe.js) +- [parallel/test-diagnostics-channel-tracing-channel-args-types.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-diagnostics-channel-tracing-channel-args-types.js) +- [parallel/test-diagnostics-channel-tracing-channel-async-error.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-diagnostics-channel-tracing-channel-async-error.js) +- [parallel/test-diagnostics-channel-tracing-channel-async.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-diagnostics-channel-tracing-channel-async.js) +- [parallel/test-diagnostics-channel-tracing-channel-callback-run-stores.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-diagnostics-channel-tracing-channel-callback-run-stores.js) +- [parallel/test-diagnostics-channel-tracing-channel-promise-run-stores.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-diagnostics-channel-tracing-channel-promise-run-stores.js) +- [parallel/test-diagnostics-channel-tracing-channel-run-stores.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-diagnostics-channel-tracing-channel-run-stores.js) +- [parallel/test-diagnostics-channel-tracing-channel-sync-error.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-diagnostics-channel-tracing-channel-sync-error.js) +- [parallel/test-diagnostics-channel-tracing-channel-sync.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-diagnostics-channel-tracing-channel-sync.js) +- [parallel/test-diagnostics-channel-worker-threads.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-diagnostics-channel-worker-threads.js) - [parallel/test-directory-import.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-directory-import.js) - [parallel/test-disable-proto-delete.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-disable-proto-delete.js) - [parallel/test-disable-proto-throw.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-disable-proto-throw.js) @@ -661,6 +715,9 @@ NOTE: This file should not be manually edited. Please edit `tests/node_compat/co - [parallel/test-domain-vm-promise-isolation.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-domain-vm-promise-isolation.js) - [parallel/test-domain-with-abort-on-uncaught-exception.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-domain-with-abort-on-uncaught-exception.js) - [parallel/test-domexception-cause.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-domexception-cause.js) +- [parallel/test-dotenv-edge-cases.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dotenv-edge-cases.js) +- [parallel/test-dotenv-node-options.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dotenv-node-options.js) +- [parallel/test-dotenv.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dotenv.js) - [parallel/test-double-tls-client.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-double-tls-client.js) - [parallel/test-double-tls-server.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-double-tls-server.js) - [parallel/test-dsa-fips-invalid-key.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dsa-fips-invalid-key.js) @@ -700,6 +757,7 @@ NOTE: This file should not be manually edited. Please edit `tests/node_compat/co - [parallel/test-eslint-prefer-common-mustnotcall.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-eslint-prefer-common-mustnotcall.js) - [parallel/test-eslint-prefer-common-mustsucceed.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-eslint-prefer-common-mustsucceed.js) - [parallel/test-eslint-prefer-primordials.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-eslint-prefer-primordials.js) +- [parallel/test-eslint-prefer-proto.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-eslint-prefer-proto.js) - [parallel/test-eslint-prefer-util-format-errors.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-eslint-prefer-util-format-errors.js) - [parallel/test-eslint-require-common-first.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-eslint-require-common-first.js) - [parallel/test-eslint-required-modules.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-eslint-required-modules.js) @@ -709,6 +767,7 @@ NOTE: This file should not be manually edited. Please edit `tests/node_compat/co - [parallel/test-event-emitter-max-listeners-warning-for-null.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-event-emitter-max-listeners-warning-for-null.js) - [parallel/test-event-emitter-max-listeners-warning-for-symbol.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-event-emitter-max-listeners-warning-for-symbol.js) - [parallel/test-event-emitter-max-listeners-warning.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-event-emitter-max-listeners-warning.js) +- [parallel/test-event-target.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-event-target.js) - [parallel/test-eventemitter-asyncresource.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-eventemitter-asyncresource.js) - [parallel/test-events-customevent.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-events-customevent.js) - [parallel/test-events-getmaxlisteners.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-events-getmaxlisteners.js) @@ -717,6 +776,7 @@ NOTE: This file should not be manually edited. Please edit `tests/node_compat/co - [parallel/test-eventtarget-memoryleakwarning.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-eventtarget-memoryleakwarning.js) - [parallel/test-eventtarget-once-twice.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-eventtarget-once-twice.js) - [parallel/test-eventtarget.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-eventtarget.js) +- [parallel/test-experimental-shared-value-conveyor.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-experimental-shared-value-conveyor.js) - [parallel/test-file-validate-mode-flag.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-file-validate-mode-flag.js) - [parallel/test-file.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-file.js) - [parallel/test-filehandle-close.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-filehandle-close.js) @@ -726,6 +786,7 @@ NOTE: This file should not be manually edited. Please edit `tests/node_compat/co - [parallel/test-force-repl.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-force-repl.js) - [parallel/test-freelist.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-freelist.js) - [parallel/test-freeze-intrinsics.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-freeze-intrinsics.js) +- [parallel/test-fs-append-file-flush.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-append-file-flush.js) - [parallel/test-fs-assert-encoding-error.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-assert-encoding-error.js) - [parallel/test-fs-buffer.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-buffer.js) - [parallel/test-fs-buffertype-writesync.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-buffertype-writesync.js) @@ -853,7 +914,17 @@ NOTE: This file should not be manually edited. Please edit `tests/node_compat/co - [parallel/test-fs-watch-encoding.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-watch-encoding.js) - [parallel/test-fs-watch-enoent.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-watch-enoent.js) - [parallel/test-fs-watch-file-enoent-after-deletion.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-watch-file-enoent-after-deletion.js) -- [parallel/test-fs-watch-recursive.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-watch-recursive.js) +- [parallel/test-fs-watch-recursive-add-file-to-existing-subfolder.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-watch-recursive-add-file-to-existing-subfolder.js) +- [parallel/test-fs-watch-recursive-add-file-to-new-folder.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-watch-recursive-add-file-to-new-folder.js) +- [parallel/test-fs-watch-recursive-add-file-with-url.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-watch-recursive-add-file-with-url.js) +- [parallel/test-fs-watch-recursive-add-file.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-watch-recursive-add-file.js) +- [parallel/test-fs-watch-recursive-add-folder.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-watch-recursive-add-folder.js) +- [parallel/test-fs-watch-recursive-assert-leaks.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-watch-recursive-assert-leaks.js) +- [parallel/test-fs-watch-recursive-promise.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-watch-recursive-promise.js) +- [parallel/test-fs-watch-recursive-symlink.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-watch-recursive-symlink.js) +- [parallel/test-fs-watch-recursive-update-file.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-watch-recursive-update-file.js) +- [parallel/test-fs-watch-recursive-validate.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-watch-recursive-validate.js) +- [parallel/test-fs-watch-recursive-watch-file.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-watch-recursive-watch-file.js) - [parallel/test-fs-watch-ref-unref.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-watch-ref-unref.js) - [parallel/test-fs-watch-stop-async.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-watch-stop-async.js) - [parallel/test-fs-watch-stop-sync.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-watch-stop-sync.js) @@ -862,6 +933,7 @@ NOTE: This file should not be manually edited. Please edit `tests/node_compat/co - [parallel/test-fs-watchfile-ref-unref.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-watchfile-ref-unref.js) - [parallel/test-fs-whatwg-url.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-whatwg-url.js) - [parallel/test-fs-write-buffer-large.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-write-buffer-large.js) +- [parallel/test-fs-write-file-flush.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-write-file-flush.js) - [parallel/test-fs-write-file-typedarrays.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-write-file-typedarrays.js) - [parallel/test-fs-write-negativeoffset.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-write-negativeoffset.js) - [parallel/test-fs-write-optional-params.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-write-optional-params.js) @@ -872,6 +944,7 @@ NOTE: This file should not be manually edited. Please edit `tests/node_compat/co - [parallel/test-fs-write-stream-err.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-write-stream-err.js) - [parallel/test-fs-write-stream-file-handle-2.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-write-stream-file-handle-2.js) - [parallel/test-fs-write-stream-file-handle.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-write-stream-file-handle.js) +- [parallel/test-fs-write-stream-flush.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-write-stream-flush.js) - [parallel/test-fs-write-stream-patch-open.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-write-stream-patch-open.js) - [parallel/test-fs-write-sync-optional-params.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-write-sync-optional-params.js) - [parallel/test-fs-writefile-with-fd.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-writefile-with-fd.js) @@ -881,11 +954,13 @@ NOTE: This file should not be manually edited. Please edit `tests/node_compat/co - [parallel/test-gc-net-timeout.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-gc-net-timeout.js) - [parallel/test-gc-tls-external-memory.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-gc-tls-external-memory.js) - [parallel/test-global-console-exists.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-global-console-exists.js) +- [parallel/test-global-customevent-disabled.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-global-customevent-disabled.js) - [parallel/test-global-customevent.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-global-customevent.js) - [parallel/test-global-domexception.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-global-domexception.js) - [parallel/test-global-encoder.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-global-encoder.js) - [parallel/test-global-setters.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-global-setters.js) - [parallel/test-global-webcrypto-classes.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-global-webcrypto-classes.js) +- [parallel/test-global-webcrypto-disbled.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-global-webcrypto-disbled.js) - [parallel/test-global-webcrypto.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-global-webcrypto.js) - [parallel/test-global-webstreams.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-global-webstreams.js) - [parallel/test-global.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-global.js) @@ -944,6 +1019,7 @@ NOTE: This file should not be manually edited. Please edit `tests/node_compat/co - [parallel/test-http-buffer-sanity.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-buffer-sanity.js) - [parallel/test-http-byteswritten.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-byteswritten.js) - [parallel/test-http-catch-uncaughtexception.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-catch-uncaughtexception.js) +- [parallel/test-http-chunk-extensions-limit.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-chunk-extensions-limit.js) - [parallel/test-http-chunk-problem.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-chunk-problem.js) - [parallel/test-http-chunked-304.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-chunked-304.js) - [parallel/test-http-chunked-smuggling.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-chunked-smuggling.js) @@ -965,6 +1041,7 @@ NOTE: This file should not be manually edited. Please edit `tests/node_compat/co - [parallel/test-http-client-agent.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-client-agent.js) - [parallel/test-http-client-check-http-token.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-client-check-http-token.js) - [parallel/test-http-client-close-event.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-client-close-event.js) +- [parallel/test-http-client-close-with-default-agent.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-client-close-with-default-agent.js) - [parallel/test-http-client-default-headers-exist.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-client-default-headers-exist.js) - [parallel/test-http-client-defaults.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-client-defaults.js) - [parallel/test-http-client-encoding.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-client-encoding.js) @@ -975,6 +1052,7 @@ NOTE: This file should not be manually edited. Please edit `tests/node_compat/co - [parallel/test-http-client-immediate-error.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-client-immediate-error.js) - [parallel/test-http-client-incomingmessage-destroy.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-client-incomingmessage-destroy.js) - [parallel/test-http-client-invalid-path.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-client-invalid-path.js) +- [parallel/test-http-client-keep-alive-hint.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-client-keep-alive-hint.js) - [parallel/test-http-client-keep-alive-release-before-finish.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-client-keep-alive-release-before-finish.js) - [parallel/test-http-client-override-global-agent.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-client-override-global-agent.js) - [parallel/test-http-client-parse-error.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-client-parse-error.js) @@ -1131,6 +1209,7 @@ NOTE: This file should not be manually edited. Please edit `tests/node_compat/co - [parallel/test-http-proxy.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-proxy.js) - [parallel/test-http-raw-headers.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-raw-headers.js) - [parallel/test-http-readable-data-event.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-readable-data-event.js) +- [parallel/test-http-remove-connection-header-persists-connection.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-remove-connection-header-persists-connection.js) - [parallel/test-http-remove-header-stays-removed.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-remove-header-stays-removed.js) - [parallel/test-http-req-close-robust-from-tampering.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-req-close-robust-from-tampering.js) - [parallel/test-http-req-res-close.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-req-res-close.js) @@ -1139,6 +1218,7 @@ NOTE: This file should not be manually edited. Please edit `tests/node_compat/co - [parallel/test-http-request-dont-override-options.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-request-dont-override-options.js) - [parallel/test-http-request-end-twice.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-request-end-twice.js) - [parallel/test-http-request-end.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-request-end.js) +- [parallel/test-http-request-host-header.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-request-host-header.js) - [parallel/test-http-request-invalid-method-error.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-request-invalid-method-error.js) - [parallel/test-http-request-join-authorization-headers.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-request-join-authorization-headers.js) - [parallel/test-http-request-large-payload.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-request-large-payload.js) @@ -1160,12 +1240,15 @@ NOTE: This file should not be manually edited. Please edit `tests/node_compat/co - [parallel/test-http-response-statuscode.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-response-statuscode.js) - [parallel/test-http-response-writehead-returns-this.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-response-writehead-returns-this.js) - [parallel/test-http-same-map.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-same-map.js) +- [parallel/test-http-server-async-dispose.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-server-async-dispose.js) - [parallel/test-http-server-capture-rejections.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-server-capture-rejections.js) - [parallel/test-http-server-client-error.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-server-client-error.js) - [parallel/test-http-server-close-all.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-server-close-all.js) +- [parallel/test-http-server-close-destroy-timeout.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-server-close-destroy-timeout.js) - [parallel/test-http-server-close-idle-wait-response.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-server-close-idle-wait-response.js) - [parallel/test-http-server-close-idle.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-server-close-idle.js) - [parallel/test-http-server-connection-list-when-close.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-server-connection-list-when-close.js) +- [parallel/test-http-server-connections-checking-leak.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-server-connections-checking-leak.js) - [parallel/test-http-server-consumed-timeout.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-server-consumed-timeout.js) - [parallel/test-http-server-de-chunked-trailer.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-server-de-chunked-trailer.js) - [parallel/test-http-server-delete-parser.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-server-delete-parser.js) @@ -1251,6 +1334,7 @@ NOTE: This file should not be manually edited. Please edit `tests/node_compat/co - [parallel/test-http2-cancel-while-client-reading.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-cancel-while-client-reading.js) - [parallel/test-http2-capture-rejection.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-capture-rejection.js) - [parallel/test-http2-clean-output.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-clean-output.js) +- [parallel/test-http2-client-connection-tunnelling.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-client-connection-tunnelling.js) - [parallel/test-http2-client-data-end.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-client-data-end.js) - [parallel/test-http2-client-destroy.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-client-destroy.js) - [parallel/test-http2-client-http1-server.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-client-http1-server.js) @@ -1427,6 +1511,7 @@ NOTE: This file should not be manually edited. Please edit `tests/node_compat/co - [parallel/test-http2-sensitive-headers.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-sensitive-headers.js) - [parallel/test-http2-sent-headers.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-sent-headers.js) - [parallel/test-http2-serve-file.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-serve-file.js) +- [parallel/test-http2-server-async-dispose.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-server-async-dispose.js) - [parallel/test-http2-server-close-callback.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-server-close-callback.js) - [parallel/test-http2-server-errors.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-server-errors.js) - [parallel/test-http2-server-http1-client.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-server-http1-client.js) @@ -1458,6 +1543,7 @@ NOTE: This file should not be manually edited. Please edit `tests/node_compat/co - [parallel/test-http2-settings-unsolicited-ack.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-settings-unsolicited-ack.js) - [parallel/test-http2-short-stream-client-server.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-short-stream-client-server.js) - [parallel/test-http2-single-headers.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-single-headers.js) +- [parallel/test-http2-socket-close.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-socket-close.js) - [parallel/test-http2-socket-proxy-handler-for-has.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-socket-proxy-handler-for-has.js) - [parallel/test-http2-socket-proxy.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-socket-proxy.js) - [parallel/test-http2-status-code-invalid.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-status-code-invalid.js) @@ -1471,6 +1557,7 @@ NOTE: This file should not be manually edited. Please edit `tests/node_compat/co - [parallel/test-http2-too-many-headers.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-too-many-headers.js) - [parallel/test-http2-too-many-settings.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-too-many-settings.js) - [parallel/test-http2-too-many-streams.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-too-many-streams.js) +- [parallel/test-http2-trailers-after-session-close.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-trailers-after-session-close.js) - [parallel/test-http2-trailers.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-trailers.js) - [parallel/test-http2-unbound-socket-proxy.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-unbound-socket-proxy.js) - [parallel/test-http2-update-settings.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-update-settings.js) @@ -1529,8 +1616,11 @@ NOTE: This file should not be manually edited. Please edit `tests/node_compat/co - [parallel/test-https-request-arguments.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-request-arguments.js) - [parallel/test-https-resume-after-renew.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-resume-after-renew.js) - [parallel/test-https-selfsigned-no-keycertsign-no-crash.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-selfsigned-no-keycertsign-no-crash.js) +- [parallel/test-https-server-async-dispose.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-server-async-dispose.js) - [parallel/test-https-server-close-all.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-server-close-all.js) +- [parallel/test-https-server-close-destroy-timeout.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-server-close-destroy-timeout.js) - [parallel/test-https-server-close-idle.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-server-close-idle.js) +- [parallel/test-https-server-connections-checking-leak.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-server-connections-checking-leak.js) - [parallel/test-https-server-headers-timeout.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-server-headers-timeout.js) - [parallel/test-https-server-options-incoming-message.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-server-options-incoming-message.js) - [parallel/test-https-server-options-server-response.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-server-options-server-response.js) @@ -1593,6 +1683,7 @@ NOTE: This file should not be manually edited. Please edit `tests/node_compat/co - [parallel/test-inspector-overwrite-config.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-inspector-overwrite-config.js) - [parallel/test-inspector-port-zero-cluster.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-inspector-port-zero-cluster.js) - [parallel/test-inspector-port-zero.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-inspector-port-zero.js) +- [parallel/test-inspector-promises.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-inspector-promises.js) - [parallel/test-inspector-reported-host.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-inspector-reported-host.js) - [parallel/test-inspector-resource-name-to-url.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-inspector-resource-name-to-url.js) - [parallel/test-inspector-runtime-evaluate-with-timeout.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-inspector-runtime-evaluate-with-timeout.js) @@ -1609,7 +1700,6 @@ NOTE: This file should not be manually edited. Please edit `tests/node_compat/co - [parallel/test-inspector.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-inspector.js) - [parallel/test-instanceof.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-instanceof.js) - [parallel/test-internal-assert.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-internal-assert.js) -- [parallel/test-internal-dtrace.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-internal-dtrace.js) - [parallel/test-internal-error-original-names.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-internal-error-original-names.js) - [parallel/test-internal-errors.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-internal-errors.js) - [parallel/test-internal-fs-syncwritestream.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-internal-fs-syncwritestream.js) @@ -1644,6 +1734,7 @@ NOTE: This file should not be manually edited. Please edit `tests/node_compat/co - [parallel/test-math-random.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-math-random.js) - [parallel/test-memory-usage-emfile.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-memory-usage-emfile.js) - [parallel/test-memory-usage.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-memory-usage.js) +- [parallel/test-messagechannel.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-messagechannel.js) - [parallel/test-messageevent-brandcheck.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-messageevent-brandcheck.js) - [parallel/test-messageport-hasref.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-messageport-hasref.js) - [parallel/test-messaging-maketransferable.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-messaging-maketransferable.js) @@ -1683,9 +1774,9 @@ NOTE: This file should not be manually edited. Please edit `tests/node_compat/co - [parallel/test-net-after-close.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-after-close.js) - [parallel/test-net-allow-half-open.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-allow-half-open.js) - [parallel/test-net-autoselectfamily-commandline-option.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-autoselectfamily-commandline-option.js) +- [parallel/test-net-autoselectfamily-default.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-autoselectfamily-default.js) - [parallel/test-net-autoselectfamily-ipv4first.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-autoselectfamily-ipv4first.js) - [parallel/test-net-autoselectfamily.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-autoselectfamily.js) -- [parallel/test-net-autoselectfamilydefault.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-autoselectfamilydefault.js) - [parallel/test-net-better-error-messages-listen.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-better-error-messages-listen.js) - [parallel/test-net-binary.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-binary.js) - [parallel/test-net-bind-twice.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-bind-twice.js) @@ -1804,16 +1895,41 @@ NOTE: This file should not be manually edited. Please edit `tests/node_compat/co - [parallel/test-perf-hooks-histogram.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-perf-hooks-histogram.js) - [parallel/test-perf-hooks-resourcetiming.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-perf-hooks-resourcetiming.js) - [parallel/test-perf-hooks-usertiming.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-perf-hooks-usertiming.js) +- [parallel/test-perf-hooks-worker-timeorigin.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-perf-hooks-worker-timeorigin.js) - [parallel/test-performance-eventlooputil.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-performance-eventlooputil.js) - [parallel/test-performance-function-async.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-performance-function-async.js) - [parallel/test-performance-function.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-performance-function.js) - [parallel/test-performance-gc.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-performance-gc.js) - [parallel/test-performance-global.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-performance-global.js) - [parallel/test-performance-measure.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-performance-measure.js) +- [parallel/test-performance-nodetiming.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-performance-nodetiming.js) - [parallel/test-performance-resourcetimingbufferfull.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-performance-resourcetimingbufferfull.js) - [parallel/test-performance-resourcetimingbuffersize.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-performance-resourcetimingbuffersize.js) - [parallel/test-performanceobserver-gc.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-performanceobserver-gc.js) - [parallel/test-performanceobserver.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-performanceobserver.js) +- [parallel/test-permission-allow-child-process-cli.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-permission-allow-child-process-cli.js) +- [parallel/test-permission-allow-worker-cli.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-permission-allow-worker-cli.js) +- [parallel/test-permission-child-process-cli.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-permission-child-process-cli.js) +- [parallel/test-permission-experimental.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-permission-experimental.js) +- [parallel/test-permission-fs-read.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-permission-fs-read.js) +- [parallel/test-permission-fs-relative-path.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-permission-fs-relative-path.js) +- [parallel/test-permission-fs-supported.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-permission-fs-supported.js) +- [parallel/test-permission-fs-symlink-relative.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-permission-fs-symlink-relative.js) +- [parallel/test-permission-fs-symlink-target-write.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-permission-fs-symlink-target-write.js) +- [parallel/test-permission-fs-symlink.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-permission-fs-symlink.js) +- [parallel/test-permission-fs-traversal-path.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-permission-fs-traversal-path.js) +- [parallel/test-permission-fs-wildcard.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-permission-fs-wildcard.js) +- [parallel/test-permission-fs-windows-path.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-permission-fs-windows-path.js) +- [parallel/test-permission-fs-write-report.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-permission-fs-write-report.js) +- [parallel/test-permission-fs-write-v8.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-permission-fs-write-v8.js) +- [parallel/test-permission-fs-write.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-permission-fs-write.js) +- [parallel/test-permission-has.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-permission-has.js) +- [parallel/test-permission-inspector.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-permission-inspector.js) +- [parallel/test-permission-processbinding.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-permission-processbinding.js) +- [parallel/test-permission-warning-flags.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-permission-warning-flags.js) +- [parallel/test-permission-worker-threads-cli.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-permission-worker-threads-cli.js) +- [parallel/test-pipe-abstract-socket-http.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-pipe-abstract-socket-http.js) +- [parallel/test-pipe-abstract-socket.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-pipe-abstract-socket.js) - [parallel/test-pipe-address.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-pipe-address.js) - [parallel/test-pipe-file-to-http.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-pipe-file-to-http.js) - [parallel/test-pipe-head.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-pipe-head.js) @@ -1875,6 +1991,7 @@ NOTE: This file should not be manually edited. Please edit `tests/node_compat/co - [parallel/test-process-exception-capture.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-exception-capture.js) - [parallel/test-process-exec-argv.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-exec-argv.js) - [parallel/test-process-execpath.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-execpath.js) +- [parallel/test-process-exit-code-validation.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-exit-code-validation.js) - [parallel/test-process-exit-code.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-exit-code.js) - [parallel/test-process-external-stdio-close-spawn.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-external-stdio-close-spawn.js) - [parallel/test-process-external-stdio-close.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-external-stdio-close.js) @@ -1904,6 +2021,7 @@ NOTE: This file should not be manually edited. Please edit `tests/node_compat/co - [parallel/test-process-remove-all-signal-listeners.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-remove-all-signal-listeners.js) - [parallel/test-process-setgroups.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-setgroups.js) - [parallel/test-process-setsourcemapsenabled.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-setsourcemapsenabled.js) +- [parallel/test-process-setuid-io-uring.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-setuid-io-uring.js) - [parallel/test-process-title-cli.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-title-cli.js) - [parallel/test-process-uid-gid.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-uid-gid.js) - [parallel/test-process-umask-mask.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-umask-mask.js) @@ -1985,6 +2103,7 @@ NOTE: This file should not be manually edited. Please edit `tests/node_compat/co - [parallel/test-repl-null-thrown.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-null-thrown.js) - [parallel/test-repl-null.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-null.js) - [parallel/test-repl-options.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-options.js) +- [parallel/test-repl-permission-model.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-permission-model.js) - [parallel/test-repl-persistent-history.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-persistent-history.js) - [parallel/test-repl-preprocess-top-level-await.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-preprocess-top-level-await.js) - [parallel/test-repl-pretty-custom-stack.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-pretty-custom-stack.js) @@ -2049,16 +2168,21 @@ NOTE: This file should not be manually edited. Please edit `tests/node_compat/co - [parallel/test-require-symlink.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-require-symlink.js) - [parallel/test-require-unicode.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-require-unicode.js) - [parallel/test-resource-usage.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-resource-usage.js) +- [parallel/test-runner-cli-concurrency.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-runner-cli-concurrency.js) +- [parallel/test-runner-cli-timeout.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-runner-cli-timeout.js) - [parallel/test-runner-cli.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-runner-cli.js) - [parallel/test-runner-concurrency.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-runner-concurrency.js) - [parallel/test-runner-coverage.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-runner-coverage.js) - [parallel/test-runner-exit-code.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-runner-exit-code.js) - [parallel/test-runner-extraneous-async-activity.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-runner-extraneous-async-activity.js) +- [parallel/test-runner-filetest-location.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-runner-filetest-location.js) - [parallel/test-runner-import-no-scheme.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-runner-import-no-scheme.js) - [parallel/test-runner-misc.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-runner-misc.js) +- [parallel/test-runner-mock-timers.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-runner-mock-timers.js) - [parallel/test-runner-mocking.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-runner-mocking.js) - [parallel/test-runner-option-validation.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-runner-option-validation.js) - [parallel/test-runner-reporters.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-runner-reporters.js) +- [parallel/test-runner-root-after-with-refed-handles.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-runner-root-after-with-refed-handles.js) - [parallel/test-runner-string-to-regexp.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-runner-string-to-regexp.js) - [parallel/test-runner-test-filter.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-runner-test-filter.js) - [parallel/test-runner-typechecking.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-runner-typechecking.js) @@ -2068,6 +2192,15 @@ NOTE: This file should not be manually edited. Please edit `tests/node_compat/co - [parallel/test-set-incoming-message-header.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-set-incoming-message-header.js) - [parallel/test-set-process-debug-port.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-set-process-debug-port.js) - [parallel/test-setproctitle.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-setproctitle.js) +- [parallel/test-shadow-realm-allowed-builtin-modules.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-shadow-realm-allowed-builtin-modules.js) +- [parallel/test-shadow-realm-custom-loaders.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-shadow-realm-custom-loaders.js) +- [parallel/test-shadow-realm-gc-module.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-shadow-realm-gc-module.js) +- [parallel/test-shadow-realm-gc.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-shadow-realm-gc.js) +- [parallel/test-shadow-realm-globals.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-shadow-realm-globals.js) +- [parallel/test-shadow-realm-import-value-resolve.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-shadow-realm-import-value-resolve.js) +- [parallel/test-shadow-realm-module.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-shadow-realm-module.js) +- [parallel/test-shadow-realm-preload-module.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-shadow-realm-preload-module.js) +- [parallel/test-shadow-realm-prepare-stack-trace.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-shadow-realm-prepare-stack-trace.js) - [parallel/test-shadow-realm.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-shadow-realm.js) - [parallel/test-sigint-infinite-loop.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-sigint-infinite-loop.js) - [parallel/test-signal-args.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-signal-args.js) @@ -2075,12 +2208,14 @@ NOTE: This file should not be manually edited. Please edit `tests/node_compat/co - [parallel/test-signal-handler.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-signal-handler.js) - [parallel/test-signal-safety.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-signal-safety.js) - [parallel/test-signal-unregister.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-signal-unregister.js) -- [parallel/test-single-executable-application.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-single-executable-application.js) +- [parallel/test-single-executable-blob-config-errors.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-single-executable-blob-config-errors.js) +- [parallel/test-single-executable-blob-config.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-single-executable-blob-config.js) - [parallel/test-snapshot-api.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-snapshot-api.js) - [parallel/test-snapshot-argv1.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-snapshot-argv1.js) - [parallel/test-snapshot-basic.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-snapshot-basic.js) - [parallel/test-snapshot-cjs-main.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-snapshot-cjs-main.js) - [parallel/test-snapshot-console.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-snapshot-console.js) +- [parallel/test-snapshot-cwd.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-snapshot-cwd.js) - [parallel/test-snapshot-dns-lookup-localhost-promise.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-snapshot-dns-lookup-localhost-promise.js) - [parallel/test-snapshot-dns-lookup-localhost.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-snapshot-dns-lookup-localhost.js) - [parallel/test-snapshot-dns-resolve-localhost-promise.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-snapshot-dns-resolve-localhost-promise.js) @@ -2090,10 +2225,12 @@ NOTE: This file should not be manually edited. Please edit `tests/node_compat/co - [parallel/test-snapshot-gzip.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-snapshot-gzip.js) - [parallel/test-snapshot-incompatible.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-snapshot-incompatible.js) - [parallel/test-snapshot-namespaced-builtin.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-snapshot-namespaced-builtin.js) +- [parallel/test-snapshot-net.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-snapshot-net.js) - [parallel/test-snapshot-typescript.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-snapshot-typescript.js) - [parallel/test-snapshot-umd.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-snapshot-umd.js) - [parallel/test-snapshot-warning.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-snapshot-warning.js) - [parallel/test-snapshot-weak-reference.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-snapshot-weak-reference.js) +- [parallel/test-snapshot-worker.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-snapshot-worker.js) - [parallel/test-socket-address.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-socket-address.js) - [parallel/test-socket-options-invalid.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-socket-options-invalid.js) - [parallel/test-socket-write-after-fin-error.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-socket-write-after-fin-error.js) @@ -2158,6 +2295,7 @@ NOTE: This file should not be manually edited. Please edit `tests/node_compat/co - [parallel/test-stream-promises.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stream-promises.js) - [parallel/test-stream-push-order.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stream-push-order.js) - [parallel/test-stream-readable-async-iterators.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stream-readable-async-iterators.js) +- [parallel/test-stream-readable-default-encoding.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stream-readable-default-encoding.js) - [parallel/test-stream-readable-dispose.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stream-readable-dispose.js) - [parallel/test-stream-readable-strategy-option.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stream-readable-strategy-option.js) - [parallel/test-stream-readable-unpipe-resume.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stream-readable-unpipe-resume.js) @@ -2323,6 +2461,7 @@ NOTE: This file should not be manually edited. Please edit `tests/node_compat/co - [parallel/test-tls-honorcipherorder.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-honorcipherorder.js) - [parallel/test-tls-inception.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-inception.js) - [parallel/test-tls-interleave.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-interleave.js) +- [parallel/test-tls-invalid-pfx.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-invalid-pfx.js) - [parallel/test-tls-invoke-queued.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-invoke-queued.js) - [parallel/test-tls-ip-servername-deprecation.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-ip-servername-deprecation.js) - [parallel/test-tls-js-stream.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-js-stream.js) @@ -2359,6 +2498,8 @@ NOTE: This file should not be manually edited. Please edit `tests/node_compat/co - [parallel/test-tls-psk-circuit.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-psk-circuit.js) - [parallel/test-tls-psk-errors.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-psk-errors.js) - [parallel/test-tls-psk-server.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-psk-server.js) +- [parallel/test-tls-reduced-SECLEVEL-in-cipher.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-reduced-SECLEVEL-in-cipher.js) +- [parallel/test-tls-reinitialize-listeners.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-reinitialize-listeners.js) - [parallel/test-tls-request-timeout.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-request-timeout.js) - [parallel/test-tls-retain-handle-no-abort.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-retain-handle-no-abort.js) - [parallel/test-tls-reuse-host-from-socket.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-reuse-host-from-socket.js) @@ -2454,6 +2595,8 @@ NOTE: This file should not be manually edited. Please edit `tests/node_compat/co - [parallel/test-unhandled-exception-rethrow-error.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-unhandled-exception-rethrow-error.js) - [parallel/test-unhandled-exception-with-worker-inuse.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-unhandled-exception-with-worker-inuse.js) - [parallel/test-unicode-node-options.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-unicode-node-options.js) +- [parallel/test-url-canParse-whatwg.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-url-canParse-whatwg.js) +- [parallel/test-url-is-url.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-url-is-url.js) - [parallel/test-url-null-char.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-url-null-char.js) - [parallel/test-url-parse-format.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-url-parse-format.js) - [parallel/test-utf8-scripts.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-utf8-scripts.js) @@ -2506,6 +2649,7 @@ NOTE: This file should not be manually edited. Please edit `tests/node_compat/co - [parallel/test-vm-cross-context.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-vm-cross-context.js) - [parallel/test-vm-data-property-writable.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-vm-data-property-writable.js) - [parallel/test-vm-deleting-property.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-vm-deleting-property.js) +- [parallel/test-vm-dynamic-import-callback-missing-flag.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-vm-dynamic-import-callback-missing-flag.js) - [parallel/test-vm-function-declaration.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-vm-function-declaration.js) - [parallel/test-vm-function-redefinition.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-vm-function-redefinition.js) - [parallel/test-vm-getters.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-vm-getters.js) @@ -2534,6 +2678,7 @@ NOTE: This file should not be manually edited. Please edit `tests/node_compat/co - [parallel/test-vm-module-reevaluate.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-vm-module-reevaluate.js) - [parallel/test-vm-module-synthetic.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-vm-module-synthetic.js) - [parallel/test-vm-new-script-new-context.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-vm-new-script-new-context.js) +- [parallel/test-vm-no-dynamic-import-callback.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-vm-no-dynamic-import-callback.js) - [parallel/test-vm-not-strict.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-vm-not-strict.js) - [parallel/test-vm-options-validation.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-vm-options-validation.js) - [parallel/test-vm-parse-abort-on-uncaught-exception.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-vm-parse-abort-on-uncaught-exception.js) @@ -2559,9 +2704,6 @@ NOTE: This file should not be manually edited. Please edit `tests/node_compat/co - [parallel/test-vm-timeout.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-vm-timeout.js) - [parallel/test-warn-sigprof.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-warn-sigprof.js) - [parallel/test-warn-stream-wrap.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-warn-stream-wrap.js) -- [parallel/test-wasm-memory-out-of-bound.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-wasm-memory-out-of-bound.js) -- [parallel/test-wasm-simple.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-wasm-simple.js) -- [parallel/test-wasm-web-api.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-wasm-web-api.js) - [parallel/test-weakref.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-weakref.js) - [parallel/test-webcrypto-constructors.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-webcrypto-constructors.js) - [parallel/test-webcrypto-cryptokey-workers.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-webcrypto-cryptokey-workers.js) @@ -2590,6 +2732,7 @@ NOTE: This file should not be manually edited. Please edit `tests/node_compat/co - [parallel/test-webcrypto-util.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-webcrypto-util.js) - [parallel/test-webcrypto-webidl.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-webcrypto-webidl.js) - [parallel/test-webcrypto-wrap-unwrap.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-webcrypto-wrap-unwrap.js) +- [parallel/test-websocket.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-websocket.js) - [parallel/test-webstream-encoding-inspect.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-webstream-encoding-inspect.js) - [parallel/test-webstream-readablestream-pipeto.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-webstream-readablestream-pipeto.js) - [parallel/test-webstream-string-tag.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-webstream-string-tag.js) @@ -2609,6 +2752,7 @@ NOTE: This file should not be manually edited. Please edit `tests/node_compat/co - [parallel/test-whatwg-events-eventtarget-this-of-listener.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-whatwg-events-eventtarget-this-of-listener.js) - [parallel/test-whatwg-readablebytestream-bad-buffers-and-views.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-whatwg-readablebytestream-bad-buffers-and-views.js) - [parallel/test-whatwg-readablebytestream.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-whatwg-readablebytestream.js) +- [parallel/test-whatwg-readablebytestreambyob.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-whatwg-readablebytestreambyob.js) - [parallel/test-whatwg-readablestream.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-whatwg-readablestream.js) - [parallel/test-whatwg-transformstream.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-whatwg-transformstream.js) - [parallel/test-whatwg-url-canparse.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-whatwg-url-canparse.js) @@ -2776,6 +2920,7 @@ NOTE: This file should not be manually edited. Please edit `tests/node_compat/co - [parallel/test-wrap-js-stream-exceptions.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-wrap-js-stream-exceptions.js) - [parallel/test-wrap-js-stream-read-stop.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-wrap-js-stream-read-stop.js) - [parallel/test-x509-escaping.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-x509-escaping.js) +- [parallel/test-zlib-brotli-16GB.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-zlib-brotli-16GB.js) - [parallel/test-zlib-brotli-flush.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-zlib-brotli-flush.js) - [parallel/test-zlib-brotli-from-brotli.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-zlib-brotli-from-brotli.js) - [parallel/test-zlib-brotli-from-string.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-zlib-brotli-from-string.js) @@ -2855,6 +3000,7 @@ NOTE: This file should not be manually edited. Please edit `tests/node_compat/co - [pummel/test-heapdump-fs-promise.js](https://github.com/nodejs/node/tree/v18.12.1/test/pummel/test-heapdump-fs-promise.js) - [pummel/test-heapdump-http2.js](https://github.com/nodejs/node/tree/v18.12.1/test/pummel/test-heapdump-http2.js) - [pummel/test-heapdump-inspector.js](https://github.com/nodejs/node/tree/v18.12.1/test/pummel/test-heapdump-inspector.js) +- [pummel/test-heapdump-shadow-realm.js](https://github.com/nodejs/node/tree/v18.12.1/test/pummel/test-heapdump-shadow-realm.js) - [pummel/test-heapdump-tls.js](https://github.com/nodejs/node/tree/v18.12.1/test/pummel/test-heapdump-tls.js) - [pummel/test-heapdump-worker.js](https://github.com/nodejs/node/tree/v18.12.1/test/pummel/test-heapdump-worker.js) - [pummel/test-heapdump-zlib.js](https://github.com/nodejs/node/tree/v18.12.1/test/pummel/test-heapdump-zlib.js) @@ -2937,6 +3083,8 @@ NOTE: This file should not be manually edited. Please edit `tests/node_compat/co - [sequential/test-gc-http-client-onerror.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-gc-http-client-onerror.js) - [sequential/test-gc-http-client-timeout.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-gc-http-client-timeout.js) - [sequential/test-gc-http-client.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-gc-http-client.js) +- [sequential/test-get-heapsnapshot-options.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-get-heapsnapshot-options.js) +- [sequential/test-heapdump-flag-custom-dir.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-heapdump-flag-custom-dir.js) - [sequential/test-heapdump-flag.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-heapdump-flag.js) - [sequential/test-heapdump.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-heapdump.js) - [sequential/test-http-econnrefused.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-http-econnrefused.js) @@ -2977,6 +3125,12 @@ NOTE: This file should not be manually edited. Please edit `tests/node_compat/co - [sequential/test-repl-timeout-throw.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-repl-timeout-throw.js) - [sequential/test-require-cache-without-stat.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-require-cache-without-stat.js) - [sequential/test-resolution-inspect-brk.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-resolution-inspect-brk.js) +- [sequential/test-single-executable-application-disable-experimental-sea-warning.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-single-executable-application-disable-experimental-sea-warning.js) +- [sequential/test-single-executable-application-empty.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-single-executable-application-empty.js) +- [sequential/test-single-executable-application-snapshot-and-code-cache.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-single-executable-application-snapshot-and-code-cache.js) +- [sequential/test-single-executable-application-snapshot.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-single-executable-application-snapshot.js) +- [sequential/test-single-executable-application-use-code-cache.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-single-executable-application-use-code-cache.js) +- [sequential/test-single-executable-application.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-single-executable-application.js) - [sequential/test-stream2-fs.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-stream2-fs.js) - [sequential/test-stream2-stderr-sync.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-stream2-stderr-sync.js) - [sequential/test-timers-block-eventloop.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-timers-block-eventloop.js) @@ -2993,4 +3147,6 @@ NOTE: This file should not be manually edited. Please edit `tests/node_compat/co - [sequential/test-worker-eventlooputil.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-worker-eventlooputil.js) - [sequential/test-worker-fshandles-error-on-termination.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-worker-fshandles-error-on-termination.js) - [sequential/test-worker-fshandles-open-close-on-termination.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-worker-fshandles-open-close-on-termination.js) +- [sequential/test-worker-heapsnapshot-options.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-worker-heapsnapshot-options.js) - [sequential/test-worker-prof.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-worker-prof.js) +- [sequential/test-write-heapsnapshot-options.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-write-heapsnapshot-options.js) diff --git a/tests/node_compat/runner/suite b/tests/node_compat/runner/suite index b114fad0ec..d12a68fc49 160000 --- a/tests/node_compat/runner/suite +++ b/tests/node_compat/runner/suite @@ -1 +1 @@ -Subproject commit b114fad0ec952fddddefc8972c43d2959388bbc1 +Subproject commit d12a68fc4930062c0bed26447a6b5245697e77c1 diff --git a/tests/node_compat/test.ts b/tests/node_compat/test.ts index db4ba4f52d..6f15f2d0b4 100644 --- a/tests/node_compat/test.ts +++ b/tests/node_compat/test.ts @@ -128,7 +128,7 @@ async function runTest(t: Deno.TestContext, path: string): Promise { } const stderrOutput = decoder.decode(stderr); const repeatCmd = magenta( - `./target/debug/deno test -A tests/node_compat/test.ts -- ${path}`, + `./target/debug/deno test --config tests/config/deno.json -A tests/node_compat/test.ts -- ${path}`, ); const msg = `"${magenta(path)}" failed: diff --git a/tests/node_compat/test/common/child_process.js b/tests/node_compat/test/common/child_process.js index d46ec39d17..e30ec0c000 100644 --- a/tests/node_compat/test/common/child_process.js +++ b/tests/node_compat/test/common/child_process.js @@ -8,7 +8,9 @@ 'use strict'; const assert = require('assert'); +const { spawnSync, execFileSync } = require('child_process'); const common = require('./'); +const util = require('util'); // Workaround for Windows Server 2008R2 // When CMD is used to launch a process and CMD is killed too quickly, the @@ -20,14 +22,13 @@ function cleanupStaleProcess(filename) { process.once('beforeExit', () => { const basename = filename.replace(/.*[/\\]/g, ''); try { - require('child_process') - .execFileSync(`${process.env.SystemRoot}\\System32\\wbem\\WMIC.exe`, [ - 'process', - 'where', - `commandline like '%${basename}%child'`, - 'delete', - '/nointeractive', - ]); + execFileSync(`${process.env.SystemRoot}\\System32\\wbem\\WMIC.exe`, [ + 'process', + 'where', + `commandline like '%${basename}%child'`, + 'delete', + '/nointeractive', + ]); } catch { // Ignore failures, there might not be any stale process to clean up. } @@ -48,9 +49,98 @@ function logAfterTime(time) { }, time); } +function checkOutput(str, check) { + if ((check instanceof RegExp && !check.test(str)) || + (typeof check === 'string' && check !== str)) { + return { passed: false, reason: `did not match ${util.inspect(check)}` }; + } + if (typeof check === 'function') { + try { + check(str); + } catch (error) { + return { + passed: false, + reason: `did not match expectation, checker throws:\n${util.inspect(error)}`, + }; + } + } + return { passed: true }; +} + +function expectSyncExit(child, { + status, + signal, + stderr: stderrCheck, + stdout: stdoutCheck, + trim = false, +}) { + const failures = []; + let stderrStr, stdoutStr; + if (status !== undefined && child.status !== status) { + failures.push(`- process terminated with status ${child.status}, expected ${status}`); + } + if (signal !== undefined && child.signal !== signal) { + failures.push(`- process terminated with signal ${child.signal}, expected ${signal}`); + } + + function logAndThrow() { + const tag = `[process ${child.pid}]:`; + console.error(`${tag} --- stderr ---`); + console.error(stderrStr === undefined ? child.stderr.toString() : stderrStr); + console.error(`${tag} --- stdout ---`); + console.error(stdoutStr === undefined ? child.stdout.toString() : stdoutStr); + console.error(`${tag} status = ${child.status}, signal = ${child.signal}`); + throw new Error(`${failures.join('\n')}`); + } + + // If status and signal are not matching expectations, fail early. + if (failures.length !== 0) { + logAndThrow(); + } + + if (stderrCheck !== undefined) { + stderrStr = child.stderr.toString(); + const { passed, reason } = checkOutput(trim ? stderrStr.trim() : stderrStr, stderrCheck); + if (!passed) { + failures.push(`- stderr ${reason}`); + } + } + if (stdoutCheck !== undefined) { + stdoutStr = child.stdout.toString(); + const { passed, reason } = checkOutput(trim ? stdoutStr.trim() : stdoutStr, stdoutCheck); + if (!passed) { + failures.push(`- stdout ${reason}`); + } + } + if (failures.length !== 0) { + logAndThrow(); + } + return { child, stderr: stderrStr, stdout: stdoutStr }; +} + +function spawnSyncAndExit(...args) { + const spawnArgs = args.slice(0, args.length - 1); + const expectations = args[args.length - 1]; + const child = spawnSync(...spawnArgs); + return expectSyncExit(child, expectations); +} + +function spawnSyncAndExitWithoutError(...args) { + const spawnArgs = args.slice(0, args.length); + const expectations = args[args.length - 1]; + const child = spawnSync(...spawnArgs); + return expectSyncExit(child, { + status: 0, + signal: null, + ...expectations, + }); +} + module.exports = { cleanupStaleProcess, logAfterTime, kExpiringChildRunTime, kExpiringParentTimer, + spawnSyncAndExit, + spawnSyncAndExitWithoutError, }; diff --git a/tests/node_compat/test/common/index.js b/tests/node_compat/test/common/index.js index 9f5b4814c1..2ebb22da28 100644 --- a/tests/node_compat/test/common/index.js +++ b/tests/node_compat/test/common/index.js @@ -11,10 +11,12 @@ */ 'use strict'; const assert = require("assert"); +const { spawn } = require('child_process'); const path = require("path"); const util = require("util"); const tmpdir = require("./tmpdir"); + function platformTimeout(ms) { return ms; } @@ -442,6 +444,36 @@ const pwdCommand = isWindows ? ['cmd.exe', ['/d', '/c', 'cd']] : ['pwd', []]; + function spawnPromisified(...args) { + let stderr = ''; + let stdout = ''; + + const child = spawn(...args); + child.stderr.setEncoding('utf8'); + child.stderr.on('data', (data) => { stderr += data; }); + child.stdout.setEncoding('utf8'); + child.stdout.on('data', (data) => { stdout += data; }); + + return new Promise((resolve, reject) => { + child.on('close', (code, signal) => { + resolve({ + code, + signal, + stderr, + stdout, + }); + }); + child.on('error', (code, signal) => { + reject({ + code, + signal, + stderr, + stdout, + }); + }); + }); + } + module.exports = { allowGlobals, expectsError, @@ -464,6 +496,7 @@ module.exports = { printSkipMessage, pwdCommand, skipIfDumbTerminal, + spawnPromisified, isDumbTerminal, isWindows, isAIX, diff --git a/tests/node_compat/test/common/index.mjs b/tests/node_compat/test/common/index.mjs index d5473eaead..d9992e67d7 100644 --- a/tests/node_compat/test/common/index.mjs +++ b/tests/node_compat/test/common/index.mjs @@ -11,105 +11,105 @@ const require = createRequire(import.meta.url); const common = require('./index.js'); const { - isMainThread, - isWindows, - isAIX, - isIBMi, - isLinuxPPCBE, - isSunOS, - isDumbTerminal, - isFreeBSD, - isOpenBSD, - isLinux, - isOSX, - enoughTestMem, - buildType, - localIPv6Hosts, - opensslCli, - PIPE, - hasCrypto, - hasIPv6, - childShouldThrowAndAbort, - checkoutEOL, - createZeroFilledFile, - platformTimeout, allowGlobals, - mustCall, - mustCallAtLeast, - mustSucceed, - hasMultiLocalhost, - skipIfDumbTerminal, - skipIfEslintMissing, + buildType, canCreateSymLink, - getCallSite, - mustNotCall, - mustNotMutateObjectDeep, - parseTestFlags, - printSkipMessage, - skip, - nodeProcessAborted, - isAlive, - expectWarning, + checkoutEOL, + childShouldThrowAndAbort, + createZeroFilledFile, + enoughTestMem, expectsError, - skipIfInspectorDisabled, - skipIf32Bits, + expectWarning, getArrayBufferViews, getBufferSources, + getCallSite, getTTYfd, + hasCrypto, + hasIPv6, + hasMultiLocalhost, + isAIX, + isAlive, + isDumbTerminal, + isFreeBSD, + isIBMi, + isLinux, + isLinuxPPCBE, + isMainThread, + isOpenBSD, + isOSX, + isSunOS, + isWindows, + localIPv6Hosts, + mustCall, + mustCallAtLeast, + mustNotCall, + mustNotMutateObjectDeep, + mustSucceed, + nodeProcessAborted, + opensslCli, + parseTestFlags, + PIPE, + platformTimeout, + printSkipMessage, runWithInvalidFD, + skip, + skipIf32Bits, + skipIfDumbTerminal, + skipIfEslintMissing, + skipIfInspectorDisabled, spawnPromisified, } = common; const getPort = () => common.PORT; export { - isMainThread, - isWindows, - isAIX, - isIBMi, - isLinuxPPCBE, - isSunOS, - isDumbTerminal, - isFreeBSD, - isOpenBSD, - isLinux, - isOSX, - enoughTestMem, - buildType, - localIPv6Hosts, - opensslCli, - PIPE, - hasCrypto, - hasIPv6, - childShouldThrowAndAbort, - checkoutEOL, - createZeroFilledFile, - platformTimeout, allowGlobals, - mustCall, - mustCallAtLeast, - mustSucceed, - hasMultiLocalhost, - skipIfDumbTerminal, - skipIfEslintMissing, + buildType, canCreateSymLink, - getCallSite, - mustNotCall, - mustNotMutateObjectDeep, - parseTestFlags, - printSkipMessage, - skip, - nodeProcessAborted, - isAlive, - expectWarning, + checkoutEOL, + childShouldThrowAndAbort, + createRequire, + createZeroFilledFile, + enoughTestMem, expectsError, - skipIfInspectorDisabled, - skipIf32Bits, + expectWarning, getArrayBufferViews, getBufferSources, - getTTYfd, - runWithInvalidFD, - createRequire, - spawnPromisified, + getCallSite, getPort, + getTTYfd, + hasCrypto, + hasIPv6, + hasMultiLocalhost, + isAIX, + isAlive, + isDumbTerminal, + isFreeBSD, + isIBMi, + isLinux, + isLinuxPPCBE, + isMainThread, + isOpenBSD, + isOSX, + isSunOS, + isWindows, + localIPv6Hosts, + mustCall, + mustCallAtLeast, + mustNotCall, + mustNotMutateObjectDeep, + mustSucceed, + nodeProcessAborted, + opensslCli, + parseTestFlags, + PIPE, + platformTimeout, + printSkipMessage, + runWithInvalidFD, + skip, + skipIf32Bits, + skipIfDumbTerminal, + skipIfEslintMissing, + skipIfInspectorDisabled, + spawnPromisified, }; diff --git a/tests/node_compat/test/common/tmpdir.js b/tests/node_compat/test/common/tmpdir.js index 668424cdcb..9315b87471 100644 --- a/tests/node_compat/test/common/tmpdir.js +++ b/tests/node_compat/test/common/tmpdir.js @@ -7,12 +7,25 @@ 'use strict'; +const { spawnSync } = require('child_process'); const fs = require('fs'); const path = require('path'); +const { pathToFileURL } = require('url'); const { isMainThread } = require('worker_threads'); -function rmSync(pathname) { - fs.rmSync(pathname, { maxRetries: 3, recursive: true, force: true }); +function rmSync(pathname, useSpawn) { + if (useSpawn) { + const escapedPath = pathname.replaceAll('\\', '\\\\'); + spawnSync( + process.execPath, + [ + '-e', + `require("fs").rmSync("${escapedPath}", { maxRetries: 3, recursive: true, force: true });`, + ], + ); + } else { + fs.rmSync(pathname, { maxRetries: 3, recursive: true, force: true }); + } } const testRoot = process.env.NODE_TEST_DIR ? @@ -25,25 +38,27 @@ const tmpdirName = '.tmp.' + const tmpPath = path.join(testRoot, tmpdirName); let firstRefresh = true; -function refresh() { - rmSync(tmpPath); +function refresh(useSpawn = false) { + rmSync(tmpPath, useSpawn); fs.mkdirSync(tmpPath); if (firstRefresh) { firstRefresh = false; // Clean only when a test uses refresh. This allows for child processes to // use the tmpdir and only the parent will clean on exit. - process.on('exit', onexit); + process.on('exit', () => { + return onexit(useSpawn); + }); } } -function onexit() { +function onexit(useSpawn) { // Change directory to avoid possible EBUSY if (isMainThread) process.chdir(testRoot); try { - rmSync(tmpPath); + rmSync(tmpPath, useSpawn); } catch (e) { console.error('Can\'t clean tmpdir:', tmpPath); @@ -71,9 +86,17 @@ function hasEnoughSpace(size) { return bavail >= Math.ceil(size / bsize); } +function fileURL(...paths) { + // When called without arguments, add explicit trailing slash + const fullPath = path.resolve(tmpPath + path.sep, ...paths); + + return pathToFileURL(fullPath); +} + module.exports = { + fileURL, + hasEnoughSpace, path: tmpPath, refresh, - hasEnoughSpace, resolve, }; diff --git a/tests/node_compat/test/internet/test-dns-lookup.js b/tests/node_compat/test/internet/test-dns-lookup.js index 8b6c171c94..ff9c31544c 100644 --- a/tests/node_compat/test/internet/test-dns-lookup.js +++ b/tests/node_compat/test/internet/test-dns-lookup.js @@ -24,7 +24,7 @@ assert.rejects( code: 'ENOTFOUND', message: `getaddrinfo ENOTFOUND ${addresses.NOT_FOUND}`, }, -); +).then(common.mustCall()); assert.rejects( dnsPromises.lookup(addresses.NOT_FOUND, { @@ -36,7 +36,7 @@ assert.rejects( code: 'ENOTFOUND', message: `getaddrinfo ENOTFOUND ${addresses.NOT_FOUND}`, }, -); +).then(common.mustCall()); dns.lookup(addresses.NOT_FOUND, { hints: 0, diff --git a/tests/node_compat/test/parallel/test-buffer-no-negative-allocation.js b/tests/node_compat/test/parallel/test-buffer-no-negative-allocation.js index 27ccf90db2..a679f26bb0 100644 --- a/tests/node_compat/test/parallel/test-buffer-no-negative-allocation.js +++ b/tests/node_compat/test/parallel/test-buffer-no-negative-allocation.js @@ -12,9 +12,8 @@ const assert = require('assert'); const { SlowBuffer } = require('buffer'); const msg = { - code: 'ERR_INVALID_ARG_VALUE', + code: 'ERR_OUT_OF_RANGE', name: 'RangeError', - message: /^The argument 'size' is invalid\. Received [^"]*$/ }; // Test that negative Buffer length inputs throw errors. diff --git a/tests/node_compat/test/parallel/test-buffer-over-max-length.js b/tests/node_compat/test/parallel/test-buffer-over-max-length.js index 5737ad8736..c53a9d6110 100644 --- a/tests/node_compat/test/parallel/test-buffer-over-max-length.js +++ b/tests/node_compat/test/parallel/test-buffer-over-max-length.js @@ -15,23 +15,12 @@ const SlowBuffer = buffer.SlowBuffer; const kMaxLength = buffer.kMaxLength; const bufferMaxSizeMsg = { - code: 'ERR_INVALID_ARG_VALUE', + code: 'ERR_OUT_OF_RANGE', name: 'RangeError', - message: /^The argument 'size' is invalid\. Received [^"]*$/ }; -assert.throws(() => Buffer((-1 >>> 0) + 2), bufferMaxSizeMsg); -assert.throws(() => SlowBuffer((-1 >>> 0) + 2), bufferMaxSizeMsg); -assert.throws(() => Buffer.alloc((-1 >>> 0) + 2), bufferMaxSizeMsg); -assert.throws(() => Buffer.allocUnsafe((-1 >>> 0) + 2), bufferMaxSizeMsg); -assert.throws(() => Buffer.allocUnsafeSlow((-1 >>> 0) + 2), bufferMaxSizeMsg); - assert.throws(() => Buffer(kMaxLength + 1), bufferMaxSizeMsg); assert.throws(() => SlowBuffer(kMaxLength + 1), bufferMaxSizeMsg); assert.throws(() => Buffer.alloc(kMaxLength + 1), bufferMaxSizeMsg); assert.throws(() => Buffer.allocUnsafe(kMaxLength + 1), bufferMaxSizeMsg); assert.throws(() => Buffer.allocUnsafeSlow(kMaxLength + 1), bufferMaxSizeMsg); - -// issue GH-4331 -assert.throws(() => Buffer.allocUnsafe(0x100000001), bufferMaxSizeMsg); -assert.throws(() => Buffer.allocUnsafe(0xFFFFFFFFF), bufferMaxSizeMsg); diff --git a/tests/node_compat/test/parallel/test-buffer-slice.js b/tests/node_compat/test/parallel/test-buffer-slice.js index 1ae0c105ad..bd3e8bbb44 100644 --- a/tests/node_compat/test/parallel/test-buffer-slice.js +++ b/tests/node_compat/test/parallel/test-buffer-slice.js @@ -78,9 +78,9 @@ for (let i = 0, s = buf.toString(); i < buf.length; ++i) { ); } -expectedSameBufs.forEach(([buf1, buf2]) => { +for (const [buf1, buf2] of expectedSameBufs) { assert.strictEqual(Buffer.compare(buf1, buf2), 0); -}); +} const utf16Buf = Buffer.from('0123456789', 'utf16le'); assert.deepStrictEqual(utf16Buf.slice(0, 6), Buffer.from('012', 'utf16le')); diff --git a/tests/node_compat/test/parallel/test-buffer-slow.js b/tests/node_compat/test/parallel/test-buffer-slow.js index b10c4c6dbc..577a92a9f6 100644 --- a/tests/node_compat/test/parallel/test-buffer-slow.js +++ b/tests/node_compat/test/parallel/test-buffer-slow.js @@ -59,9 +59,8 @@ assert.throws(() => SlowBuffer(true), bufferInvalidTypeMsg); // Should throw with invalid length value const bufferMaxSizeMsg = { - code: 'ERR_INVALID_ARG_VALUE', + code: 'ERR_OUT_OF_RANGE', name: 'RangeError', - message: /^The argument 'size' is invalid\. Received [^"]*$/ }; assert.throws(() => SlowBuffer(NaN), bufferMaxSizeMsg); assert.throws(() => SlowBuffer(Infinity), bufferMaxSizeMsg); diff --git a/tests/node_compat/test/parallel/test-buffer-tostring-rangeerror.js b/tests/node_compat/test/parallel/test-buffer-tostring-rangeerror.js index dbc69747e3..9ec11056c5 100644 --- a/tests/node_compat/test/parallel/test-buffer-tostring-rangeerror.js +++ b/tests/node_compat/test/parallel/test-buffer-tostring-rangeerror.js @@ -8,18 +8,22 @@ 'use strict'; require('../common'); -// This test ensures that Node.js throws a RangeError when trying to convert a -// gigantic buffer into a string. +// This test ensures that Node.js throws an Error when trying to convert a +// large buffer into a string. // Regression test for https://github.com/nodejs/node/issues/649. const assert = require('assert'); -const SlowBuffer = require('buffer').SlowBuffer; +const { + SlowBuffer, + constants: { + MAX_STRING_LENGTH, + }, +} = require('buffer'); -const len = 1422561062959; +const len = MAX_STRING_LENGTH + 1; const message = { - code: 'ERR_INVALID_ARG_VALUE', - name: 'RangeError', - message: /^The argument 'size' is invalid\. Received [^"]*$/ + code: 'ERR_STRING_TOO_LONG', + name: 'Error', }; assert.throws(() => Buffer(len).toString('utf8'), message); assert.throws(() => SlowBuffer(len).toString('utf8'), message); diff --git a/tests/node_compat/test/parallel/test-console-table.js b/tests/node_compat/test/parallel/test-console-table.js index da3c66032f..991521e8e3 100644 --- a/tests/node_compat/test/parallel/test-console-table.js +++ b/tests/node_compat/test/parallel/test-console-table.js @@ -45,19 +45,19 @@ test([1, 2, 3], ` ┌─────────┬────────┐ │ (index) │ Values │ ├─────────┼────────┤ -│ 0 │ 1 │ -│ 1 │ 2 │ -│ 2 │ 3 │ +│ 0 │ 1 │ +│ 1 │ 2 │ +│ 2 │ 3 │ └─────────┴────────┘ `); test([Symbol(), 5, [10]], ` ┌─────────┬────┬──────────┐ -│ (index) │ 0 │ Values │ +│ (index) │ 0 │ Values │ ├─────────┼────┼──────────┤ -│ 0 │ │ Symbol() │ -│ 1 │ │ 5 │ -│ 2 │ 10 │ │ +│ 0 │ │ Symbol() │ +│ 1 │ │ 5 │ +│ 2 │ 10 │ │ └─────────┴────┴──────────┘ `); @@ -65,46 +65,46 @@ test([null, 5], ` ┌─────────┬────────┐ │ (index) │ Values │ ├─────────┼────────┤ -│ 0 │ null │ -│ 1 │ 5 │ +│ 0 │ null │ +│ 1 │ 5 │ └─────────┴────────┘ `); test([undefined, 5], ` ┌─────────┬───────────┐ -│ (index) │ Values │ +│ (index) │ Values │ ├─────────┼───────────┤ -│ 0 │ undefined │ -│ 1 │ 5 │ +│ 0 │ undefined │ +│ 1 │ 5 │ └─────────┴───────────┘ `); test({ a: 1, b: Symbol(), c: [10] }, ` ┌─────────┬────┬──────────┐ -│ (index) │ 0 │ Values │ +│ (index) │ 0 │ Values │ ├─────────┼────┼──────────┤ -│ a │ │ 1 │ -│ b │ │ Symbol() │ -│ c │ 10 │ │ +│ a │ │ 1 │ +│ b │ │ Symbol() │ +│ c │ 10 │ │ └─────────┴────┴──────────┘ `); test(new Map([ ['a', 1], [Symbol(), [2]] ]), ` ┌───────────────────┬──────────┬────────┐ -│ (iteration index) │ Key │ Values │ +│ (iteration index) │ Key │ Values │ ├───────────────────┼──────────┼────────┤ -│ 0 │ 'a' │ 1 │ -│ 1 │ Symbol() │ [ 2 ] │ +│ 0 │ 'a' │ 1 │ +│ 1 │ Symbol() │ [ 2 ] │ └───────────────────┴──────────┴────────┘ `); test(new Set([1, 2, Symbol()]), ` ┌───────────────────┬──────────┐ -│ (iteration index) │ Values │ +│ (iteration index) │ Values │ ├───────────────────┼──────────┤ -│ 0 │ 1 │ -│ 1 │ 2 │ -│ 2 │ Symbol() │ +│ 0 │ 1 │ +│ 1 │ 2 │ +│ 2 │ Symbol() │ └───────────────────┴──────────┘ `); @@ -112,8 +112,8 @@ test({ a: 1, b: 2 }, ['a'], ` ┌─────────┬───┐ │ (index) │ a │ ├─────────┼───┤ -│ a │ │ -│ b │ │ +│ a │ │ +│ b │ │ └─────────┴───┘ `); @@ -121,8 +121,8 @@ test([{ a: 1, b: 2 }, { a: 3, c: 4 }], ['a'], ` ┌─────────┬───┐ │ (index) │ a │ ├─────────┼───┤ -│ 0 │ 1 │ -│ 1 │ 3 │ +│ 0 │ 1 │ +│ 1 │ 3 │ └─────────┴───┘ `); @@ -130,9 +130,9 @@ test(new Map([[1, 1], [2, 2], [3, 3]]).entries(), ` ┌───────────────────┬─────┬────────┐ │ (iteration index) │ Key │ Values │ ├───────────────────┼─────┼────────┤ -│ 0 │ 1 │ 1 │ -│ 1 │ 2 │ 2 │ -│ 2 │ 3 │ 3 │ +│ 0 │ 1 │ 1 │ +│ 1 │ 2 │ 2 │ +│ 2 │ 3 │ 3 │ └───────────────────┴─────┴────────┘ `); @@ -140,9 +140,9 @@ test(new Map([[1, 1], [2, 2], [3, 3]]).values(), ` ┌───────────────────┬────────┐ │ (iteration index) │ Values │ ├───────────────────┼────────┤ -│ 0 │ 1 │ -│ 1 │ 2 │ -│ 2 │ 3 │ +│ 0 │ 1 │ +│ 1 │ 2 │ +│ 2 │ 3 │ └───────────────────┴────────┘ `); @@ -150,9 +150,9 @@ test(new Map([[1, 1], [2, 2], [3, 3]]).keys(), ` ┌───────────────────┬────────┐ │ (iteration index) │ Values │ ├───────────────────┼────────┤ -│ 0 │ 1 │ -│ 1 │ 2 │ -│ 2 │ 3 │ +│ 0 │ 1 │ +│ 1 │ 2 │ +│ 2 │ 3 │ └───────────────────┴────────┘ `); @@ -160,9 +160,9 @@ test(new Set([1, 2, 3]).values(), ` ┌───────────────────┬────────┐ │ (iteration index) │ Values │ ├───────────────────┼────────┤ -│ 0 │ 1 │ -│ 1 │ 2 │ -│ 2 │ 3 │ +│ 0 │ 1 │ +│ 1 │ 2 │ +│ 2 │ 3 │ └───────────────────┴────────┘ `); @@ -171,15 +171,15 @@ test({ a: { a: 1, b: 2, c: 3 } }, ` ┌─────────┬───┬───┬───┐ │ (index) │ a │ b │ c │ ├─────────┼───┼───┼───┤ -│ a │ 1 │ 2 │ 3 │ +│ a │ 1 │ 2 │ 3 │ └─────────┴───┴───┴───┘ `); test({ a: { a: { a: 1, b: 2, c: 3 } } }, ` ┌─────────┬──────────┐ -│ (index) │ a │ +│ (index) │ a │ ├─────────┼──────────┤ -│ a │ [Object] │ +│ a │ [Object] │ └─────────┴──────────┘ `); @@ -187,7 +187,7 @@ test({ a: [1, 2] }, ` ┌─────────┬───┬───┐ │ (index) │ 0 │ 1 │ ├─────────┼───┼───┤ -│ a │ 1 │ 2 │ +│ a │ 1 │ 2 │ └─────────┴───┴───┘ `); @@ -195,9 +195,9 @@ test({ a: [1, 2, 3, 4, 5], b: 5, c: { e: 5 } }, ` ┌─────────┬───┬───┬───┬───┬───┬───┬────────┐ │ (index) │ 0 │ 1 │ 2 │ 3 │ 4 │ e │ Values │ ├─────────┼───┼───┼───┼───┼───┼───┼────────┤ -│ a │ 1 │ 2 │ 3 │ 4 │ 5 │ │ │ -│ b │ │ │ │ │ │ │ 5 │ -│ c │ │ │ │ │ │ 5 │ │ +│ a │ 1 │ 2 │ 3 │ 4 │ 5 │ │ │ +│ b │ │ │ │ │ │ │ 5 │ +│ c │ │ │ │ │ │ 5 │ │ └─────────┴───┴───┴───┴───┴───┴───┴────────┘ `); @@ -205,9 +205,9 @@ test(new Uint8Array([1, 2, 3]), ` ┌─────────┬────────┐ │ (index) │ Values │ ├─────────┼────────┤ -│ 0 │ 1 │ -│ 1 │ 2 │ -│ 2 │ 3 │ +│ 0 │ 1 │ +│ 1 │ 2 │ +│ 2 │ 3 │ └─────────┴────────┘ `); @@ -215,9 +215,9 @@ test(Buffer.from([1, 2, 3]), ` ┌─────────┬────────┐ │ (index) │ Values │ ├─────────┼────────┤ -│ 0 │ 1 │ -│ 1 │ 2 │ -│ 2 │ 3 │ +│ 0 │ 1 │ +│ 1 │ 2 │ +│ 2 │ 3 │ └─────────┴────────┘ `); @@ -225,7 +225,7 @@ test({ a: undefined }, ['x'], ` ┌─────────┬───┐ │ (index) │ x │ ├─────────┼───┤ -│ a │ │ +│ a │ │ └─────────┴───┘ `); @@ -245,23 +245,23 @@ test(new Map(), ` test([{ a: 1, b: 'Y' }, { a: 'Z', b: 2 }], ` ┌─────────┬─────┬─────┐ -│ (index) │ a │ b │ +│ (index) │ a │ b │ ├─────────┼─────┼─────┤ -│ 0 │ 1 │ 'Y' │ -│ 1 │ 'Z' │ 2 │ +│ 0 │ 1 │ 'Y' │ +│ 1 │ 'Z' │ 2 │ └─────────┴─────┴─────┘ `); { const line = '─'.repeat(79); - const header = `${' '.repeat(37)}name${' '.repeat(40)}`; + const header = `name${' '.repeat(77)}`; const name = 'very long long long long long long long long long long long ' + 'long long long long'; test([{ name }], ` ┌─────────┬──${line}──┐ -│ (index) │ ${header}│ +│ (index) │ ${header} │ ├─────────┼──${line}──┤ -│ 0 │ '${name}' │ +│ 0 │ '${name}' │ └─────────┴──${line}──┘ `); } @@ -270,8 +270,8 @@ test({ foo: '¥', bar: '¥' }, ` ┌─────────┬────────┐ │ (index) │ Values │ ├─────────┼────────┤ -│ foo │ '¥' │ -│ bar │ '¥' │ +│ foo │ '¥' │ +│ bar │ '¥' │ └─────────┴────────┘ `); @@ -279,8 +279,8 @@ test({ foo: '你好', bar: 'hello' }, ` ┌─────────┬─────────┐ │ (index) │ Values │ ├─────────┼─────────┤ -│ foo │ '你好' │ -│ bar │ 'hello' │ +│ foo │ '你好' │ +│ bar │ 'hello' │ └─────────┴─────────┘ `); @@ -292,8 +292,8 @@ test([{ foo: 10 }, { foo: 20 }], ['__proto__'], ` ┌─────────┬───────────┐ │ (index) │ __proto__ │ ├─────────┼───────────┤ -│ 0 │ │ -│ 1 │ │ +│ 0 │ │ +│ 1 │ │ └─────────┴───────────┘ `); assert.strictEqual('0' in Object.prototype, false); diff --git a/tests/node_compat/test/parallel/test-diagnostics-channel-pub-sub.js b/tests/node_compat/test/parallel/test-diagnostics-channel-pub-sub.js index 8a85548231..ef2486f5af 100644 --- a/tests/node_compat/test/parallel/test-diagnostics-channel-pub-sub.js +++ b/tests/node_compat/test/parallel/test-diagnostics-channel-pub-sub.js @@ -49,3 +49,10 @@ assert.ok(!dc.unsubscribe(name, subscriber)); assert.throws(() => { dc.subscribe(name, null); }, { code: 'ERR_INVALID_ARG_TYPE' }); + +// Reaching zero subscribers should not delete from the channels map as there +// will be no more weakref to incRef if another subscribe happens while the +// channel object itself exists. +channel.subscribe(subscriber); +channel.unsubscribe(subscriber); +channel.subscribe(subscriber); diff --git a/tests/node_compat/test/parallel/test-event-emitter-emit-context.js b/tests/node_compat/test/parallel/test-event-emitter-emit-context.js index 437a1fadbc..76c22aa9a0 100644 --- a/tests/node_compat/test/parallel/test-event-emitter-emit-context.js +++ b/tests/node_compat/test/parallel/test-event-emitter-emit-context.js @@ -15,7 +15,7 @@ const EE = new EventEmitter(); // Works as expected if the context has no `constructor.name` { - const ctx = Object.create(null); + const ctx = { __proto__: null }; assert.throws( () => EE.emit.call(ctx, 'error', new Error('foo')), common.expectsError({ name: 'Error', message: 'foo' }) diff --git a/tests/node_compat/test/parallel/test-event-emitter-error-monitor.js b/tests/node_compat/test/parallel/test-event-emitter-error-monitor.js index d6676a8e1a..e5df20e601 100644 --- a/tests/node_compat/test/parallel/test-event-emitter-error-monitor.js +++ b/tests/node_compat/test/parallel/test-event-emitter-error-monitor.js @@ -32,7 +32,7 @@ EE.emit('error', theErr); // Verify it works with once process.nextTick(() => EE.emit('error', theErr)); -assert.rejects(EventEmitter.once(EE, 'notTriggered'), theErr); +assert.rejects(EventEmitter.once(EE, 'notTriggered'), theErr).then(common.mustCall()); // Only error events trigger error monitor EE.on('aEvent', common.mustCall()); diff --git a/tests/node_compat/test/parallel/test-file-write-stream.js b/tests/node_compat/test/parallel/test-file-write-stream.js index 6b8c3d4949..22ebadd1cb 100644 --- a/tests/node_compat/test/parallel/test-file-write-stream.js +++ b/tests/node_compat/test/parallel/test-file-write-stream.js @@ -30,10 +30,9 @@ const common = require('../common'); const assert = require('assert'); -const path = require('path'); const fs = require('fs'); const tmpdir = require('../common/tmpdir'); -const fn = path.join(tmpdir.path, 'write.txt'); +const fn = tmpdir.resolve('write.txt'); tmpdir.refresh(); const file = fs.createWriteStream(fn, { highWaterMark: 10 diff --git a/tests/node_compat/test/parallel/test-file-write-stream2.js b/tests/node_compat/test/parallel/test-file-write-stream2.js index 12b7f243d4..8b23683a75 100644 --- a/tests/node_compat/test/parallel/test-file-write-stream2.js +++ b/tests/node_compat/test/parallel/test-file-write-stream2.js @@ -30,13 +30,12 @@ require('../common'); const assert = require('assert'); -const path = require('path'); const fs = require('fs'); const tmpdir = require('../common/tmpdir'); -const filepath = path.join(tmpdir.path, 'write.txt'); +const filepath = tmpdir.resolve('write.txt'); const EXPECTED = '012345678910'; diff --git a/tests/node_compat/test/parallel/test-file-write-stream3.js b/tests/node_compat/test/parallel/test-file-write-stream3.js index f34b5f6eaf..2dd5444a65 100644 --- a/tests/node_compat/test/parallel/test-file-write-stream3.js +++ b/tests/node_compat/test/parallel/test-file-write-stream3.js @@ -29,13 +29,12 @@ 'use strict'; const common = require('../common'); const assert = require('assert'); -const path = require('path'); const fs = require('fs'); const tmpdir = require('../common/tmpdir'); -const filepath = path.join(tmpdir.path, 'write_pos.txt'); +const filepath = tmpdir.resolve('write_pos.txt'); const cb_expected = 'write open close write open close write open close '; diff --git a/tests/node_compat/test/parallel/test-file-write-stream4.js b/tests/node_compat/test/parallel/test-file-write-stream4.js index 8a143c2c40..9d5cd7d32f 100644 --- a/tests/node_compat/test/parallel/test-file-write-stream4.js +++ b/tests/node_compat/test/parallel/test-file-write-stream4.js @@ -11,13 +11,12 @@ // Refs: https://github.com/nodejs/node/issues/31366 const common = require('../common'); -const path = require('path'); const fs = require('fs'); const tmpdir = require('../common/tmpdir'); tmpdir.refresh(); -const filepath = path.join(tmpdir.path, 'write_pos.txt'); +const filepath = tmpdir.resolve('write_pos.txt'); const fileReadStream = fs.createReadStream(process.execPath); const fileWriteStream = fs.createWriteStream(filepath, { diff --git a/tests/node_compat/test/parallel/test-fs-access.js b/tests/node_compat/test/parallel/test-fs-access.js index a67f9fe077..8add7d553e 100644 --- a/tests/node_compat/test/parallel/test-fs-access.js +++ b/tests/node_compat/test/parallel/test-fs-access.js @@ -20,15 +20,14 @@ if (common.isIBMi) const assert = require('assert'); const fs = require('fs'); -const path = require('path'); const { internalBinding } = require('internal/test/binding'); const { UV_ENOENT } = internalBinding('uv'); const tmpdir = require('../common/tmpdir'); -const doesNotExist = path.join(tmpdir.path, '__this_should_not_exist'); -const readOnlyFile = path.join(tmpdir.path, 'read_only_file'); -const readWriteFile = path.join(tmpdir.path, 'read_write_file'); +const doesNotExist = tmpdir.resolve('__this_should_not_exist'); +const readOnlyFile = tmpdir.resolve('read_only_file'); +const readWriteFile = tmpdir.resolve('read_write_file'); function createFileWithPerms(file, mode) { fs.writeFileSync(file, ''); @@ -71,10 +70,10 @@ if (!common.isWindows && process.getuid() === 0) { } } -assert.strictEqual(typeof fs.F_OK, 'number'); -assert.strictEqual(typeof fs.R_OK, 'number'); -assert.strictEqual(typeof fs.W_OK, 'number'); -assert.strictEqual(typeof fs.X_OK, 'number'); +assert.strictEqual(typeof fs.constants.F_OK, 'number'); +assert.strictEqual(typeof fs.constants.R_OK, 'number'); +assert.strictEqual(typeof fs.constants.W_OK, 'number'); +assert.strictEqual(typeof fs.constants.X_OK, 'number'); const throwNextTick = (e) => { process.nextTick(() => { throw e; }); }; @@ -84,16 +83,16 @@ fs.access(__filename, common.mustCall(function(...args) { fs.promises.access(__filename) .then(common.mustCall()) .catch(throwNextTick); -fs.access(__filename, fs.R_OK, common.mustCall(function(...args) { +fs.access(__filename, fs.constants.R_OK, common.mustCall(function(...args) { assert.deepStrictEqual(args, [null]); })); -fs.promises.access(__filename, fs.R_OK) +fs.promises.access(__filename, fs.constants.R_OK) .then(common.mustCall()) .catch(throwNextTick); -fs.access(readOnlyFile, fs.R_OK, common.mustCall(function(...args) { +fs.access(readOnlyFile, fs.constants.R_OK, common.mustCall(function(...args) { assert.deepStrictEqual(args, [null]); })); -fs.promises.access(readOnlyFile, fs.R_OK) +fs.promises.access(readOnlyFile, fs.constants.R_OK) .then(common.mustCall()) .catch(throwNextTick); @@ -119,8 +118,8 @@ fs.promises.access(readOnlyFile, fs.R_OK) assert.strictEqual(err.path, readOnlyFile); } } - fs.access(readOnlyFile, fs.W_OK, common.mustCall(expectedError)); - fs.promises.access(readOnlyFile, fs.W_OK) + fs.access(readOnlyFile, fs.constants.W_OK, common.mustCall(expectedError)); + fs.promises.access(readOnlyFile, fs.constants.W_OK) .then(common.mustNotCall(), common.mustCall(expectedError)) .catch(throwNextTick); } @@ -132,18 +131,18 @@ fs.promises.access(readOnlyFile, fs.R_OK) return true; }; assert.throws( - () => { fs.access(100, fs.F_OK, common.mustNotCall()); }, + () => { fs.access(100, fs.constants.F_OK, common.mustNotCall()); }, expectedError ); - fs.promises.access(100, fs.F_OK) + fs.promises.access(100, fs.constants.F_OK) .then(common.mustNotCall(), common.mustCall(expectedError)) .catch(throwNextTick); } assert.throws( () => { - fs.access(__filename, fs.F_OK); + fs.access(__filename, fs.constants.F_OK); }, { code: 'ERR_INVALID_ARG_TYPE', @@ -152,7 +151,7 @@ assert.throws( assert.throws( () => { - fs.access(__filename, fs.F_OK, common.mustNotMutateObjectDeep({})); + fs.access(__filename, fs.constants.F_OK, common.mustNotMutateObjectDeep({})); }, { code: 'ERR_INVALID_ARG_TYPE', @@ -161,14 +160,14 @@ assert.throws( // Regular access should not throw. fs.accessSync(__filename); -const mode = fs.R_OK | fs.W_OK; +const mode = fs.constants.R_OK | fs.constants.W_OK; fs.accessSync(readWriteFile, mode); // Invalid modes should throw. [ false, 1n, - { [Symbol.toPrimitive]() { return fs.R_OK; } }, + { [Symbol.toPrimitive]() { return fs.constants.R_OK; } }, [1], 'r', ].forEach((mode, i) => { diff --git a/tests/node_compat/test/parallel/test-fs-append-file-sync.js b/tests/node_compat/test/parallel/test-fs-append-file-sync.js index bed75f1717..fa79ddb55f 100644 --- a/tests/node_compat/test/parallel/test-fs-append-file-sync.js +++ b/tests/node_compat/test/parallel/test-fs-append-file-sync.js @@ -29,7 +29,6 @@ 'use strict'; const common = require('../common'); const assert = require('assert'); -const join = require('path').join; const fs = require('fs'); const currentFileData = 'ABCD'; @@ -47,7 +46,7 @@ const tmpdir = require('../common/tmpdir'); tmpdir.refresh(); // Test that empty file will be created and have content added. -const filename = join(tmpdir.path, 'append-sync.txt'); +const filename = tmpdir.resolve('append-sync.txt'); fs.appendFileSync(filename, data); @@ -56,7 +55,7 @@ const fileData = fs.readFileSync(filename); assert.strictEqual(Buffer.byteLength(data), fileData.length); // Test that appends data to a non empty file. -const filename2 = join(tmpdir.path, 'append-sync2.txt'); +const filename2 = tmpdir.resolve('append-sync2.txt'); fs.writeFileSync(filename2, currentFileData); fs.appendFileSync(filename2, data); @@ -67,7 +66,7 @@ assert.strictEqual(Buffer.byteLength(data) + currentFileData.length, fileData2.length); // Test that appendFileSync accepts buffers. -const filename3 = join(tmpdir.path, 'append-sync3.txt'); +const filename3 = tmpdir.resolve('append-sync3.txt'); fs.writeFileSync(filename3, currentFileData); const buf = Buffer.from(data, 'utf8'); @@ -77,7 +76,7 @@ const fileData3 = fs.readFileSync(filename3); assert.strictEqual(buf.length + currentFileData.length, fileData3.length); -const filename4 = join(tmpdir.path, 'append-sync4.txt'); +const filename4 = tmpdir.resolve('append-sync4.txt'); fs.writeFileSync(filename4, currentFileData, common.mustNotMutateObjectDeep({ mode: m })); [ @@ -102,7 +101,7 @@ assert.strictEqual(Buffer.byteLength(String(num)) + currentFileData.length, fileData4.length); // Test that appendFile accepts file descriptors. -const filename5 = join(tmpdir.path, 'append-sync5.txt'); +const filename5 = tmpdir.resolve('append-sync5.txt'); fs.writeFileSync(filename5, currentFileData); const filename5fd = fs.openSync(filename5, 'a+', 0o600); diff --git a/tests/node_compat/test/parallel/test-fs-copyfile.js b/tests/node_compat/test/parallel/test-fs-copyfile.js index 37d7097505..d00a076f31 100644 --- a/tests/node_compat/test/parallel/test-fs-copyfile.js +++ b/tests/node_compat/test/parallel/test-fs-copyfile.js @@ -17,9 +17,8 @@ const { UV_ENOENT, UV_EEXIST } = internalBinding('uv'); -const path = require('path'); const src = fixtures.path('a.js'); -const dest = path.join(tmpdir.path, 'copyfile.out'); +const dest = tmpdir.resolve('copyfile.out'); const { COPYFILE_EXCL, COPYFILE_FICLONE, diff --git a/tests/node_compat/test/parallel/test-fs-open-flags.js b/tests/node_compat/test/parallel/test-fs-open-flags.js index 2bacf8300b..89f6bdcb62 100644 --- a/tests/node_compat/test/parallel/test-fs-open-flags.js +++ b/tests/node_compat/test/parallel/test-fs-open-flags.js @@ -34,7 +34,6 @@ const fixtures = require('../common/fixtures'); const assert = require('assert'); const fs = require('fs'); -const path = require('path'); // 0 if not found in fs.constants const { O_APPEND = 0, @@ -93,7 +92,7 @@ assert.throws( if (common.isLinux || common.isOSX) { const tmpdir = require('../common/tmpdir'); tmpdir.refresh(); - const file = path.join(tmpdir.path, 'a.js'); + const file = tmpdir.resolve('a.js'); fs.copyFileSync(fixtures.path('a.js'), file); fs.open(file, O_DSYNC, common.mustSucceed((fd) => { fs.closeSync(fd); diff --git a/tests/node_compat/test/parallel/test-fs-open-mode-mask.js b/tests/node_compat/test/parallel/test-fs-open-mode-mask.js index 20dd31b8c3..30a2cd354d 100644 --- a/tests/node_compat/test/parallel/test-fs-open-mode-mask.js +++ b/tests/node_compat/test/parallel/test-fs-open-mode-mask.js @@ -11,7 +11,6 @@ const common = require('../common'); const assert = require('assert'); -const path = require('path'); const fs = require('fs'); const mode = common.isWindows ? 0o444 : 0o644; @@ -27,7 +26,7 @@ function test(mode, asString) { (mode | maskToIgnore).toString(8) : (mode | maskToIgnore); { - const file = path.join(tmpdir.path, `openSync-${suffix}.txt`); + const file = tmpdir.resolve(`openSync-${suffix}.txt`); const fd = fs.openSync(file, 'w+', input); assert.strictEqual(fs.fstatSync(fd).mode & 0o777, mode); fs.closeSync(fd); @@ -35,7 +34,7 @@ function test(mode, asString) { } { - const file = path.join(tmpdir.path, `open-${suffix}.txt`); + const file = tmpdir.resolve(`open-${suffix}.txt`); fs.open(file, 'w+', input, common.mustSucceed((fd) => { assert.strictEqual(fs.fstatSync(fd).mode & 0o777, mode); fs.closeSync(fd); diff --git a/tests/node_compat/test/parallel/test-fs-open-numeric-flags.js b/tests/node_compat/test/parallel/test-fs-open-numeric-flags.js index 2e62a1cfd6..025eff60d2 100644 --- a/tests/node_compat/test/parallel/test-fs-open-numeric-flags.js +++ b/tests/node_compat/test/parallel/test-fs-open-numeric-flags.js @@ -10,13 +10,12 @@ require('../common'); const assert = require('assert'); const fs = require('fs'); -const path = require('path'); const tmpdir = require('../common/tmpdir'); tmpdir.refresh(); // O_WRONLY without O_CREAT shall fail with ENOENT -const pathNE = path.join(tmpdir.path, 'file-should-not-exist'); +const pathNE = tmpdir.resolve('file-should-not-exist'); assert.throws( () => fs.openSync(pathNE, fs.constants.O_WRONLY), (e) => e.code === 'ENOENT' diff --git a/tests/node_compat/test/parallel/test-fs-read-stream-autoClose.js b/tests/node_compat/test/parallel/test-fs-read-stream-autoClose.js index 70fd17e00e..2ab7b69e33 100644 --- a/tests/node_compat/test/parallel/test-fs-read-stream-autoClose.js +++ b/tests/node_compat/test/parallel/test-fs-read-stream-autoClose.js @@ -9,10 +9,9 @@ const common = require('../common'); const fs = require('fs'); -const path = require('path'); const assert = require('assert'); const tmpdir = require('../common/tmpdir'); -const writeFile = path.join(tmpdir.path, 'write-autoClose.txt'); +const writeFile = tmpdir.resolve('write-autoClose.txt'); tmpdir.refresh(); const file = fs.createWriteStream(writeFile, { autoClose: true }); diff --git a/tests/node_compat/test/parallel/test-fs-read-stream-fd.js b/tests/node_compat/test/parallel/test-fs-read-stream-fd.js index 5562c5796b..ba7c06419a 100644 --- a/tests/node_compat/test/parallel/test-fs-read-stream-fd.js +++ b/tests/node_compat/test/parallel/test-fs-read-stream-fd.js @@ -30,9 +30,8 @@ const common = require('../common'); const fs = require('fs'); const assert = require('assert'); -const path = require('path'); const tmpdir = require('../common/tmpdir'); -const file = path.join(tmpdir.path, '/read_stream_fd_test.txt'); +const file = tmpdir.resolve('read_stream_fd_test.txt'); const input = 'hello world'; let output = ''; diff --git a/tests/node_compat/test/parallel/test-fs-read-stream-inherit.js b/tests/node_compat/test/parallel/test-fs-read-stream-inherit.js index 79fa884863..2f8c139e8c 100644 --- a/tests/node_compat/test/parallel/test-fs-read-stream-inherit.js +++ b/tests/node_compat/test/parallel/test-fs-read-stream-inherit.js @@ -57,7 +57,7 @@ const rangeFile = fixtures.path('x.txt'); } { - const file = fs.createReadStream(fn, Object.create({ encoding: 'utf8' })); + const file = fs.createReadStream(fn, { __proto__: { encoding: 'utf8' } }); file.length = 0; file.on('data', function(data) { assert.strictEqual(typeof data, 'string'); @@ -75,7 +75,7 @@ const rangeFile = fixtures.path('x.txt'); } { - const options = Object.create({ bufferSize: 1, start: 1, end: 2 }); + const options = { __proto__: { bufferSize: 1, start: 1, end: 2 } }; const file = fs.createReadStream(rangeFile, options); assert.strictEqual(file.start, 1); assert.strictEqual(file.end, 2); @@ -89,7 +89,7 @@ const rangeFile = fixtures.path('x.txt'); } { - const options = Object.create({ bufferSize: 1, start: 1 }); + const options = { __proto__: { bufferSize: 1, start: 1 } }; const file = fs.createReadStream(rangeFile, options); assert.strictEqual(file.start, 1); file.data = ''; @@ -103,7 +103,7 @@ const rangeFile = fixtures.path('x.txt'); // https://github.com/joyent/node/issues/2320 { - const options = Object.create({ bufferSize: 1.23, start: 1 }); + const options = { __proto__: { bufferSize: 1.23, start: 1 } }; const file = fs.createReadStream(rangeFile, options); assert.strictEqual(file.start, 1); file.data = ''; @@ -122,7 +122,7 @@ const rangeFile = fixtures.path('x.txt'); assert.throws( () => { - fs.createReadStream(rangeFile, Object.create({ start: 10, end: 2 })); + fs.createReadStream(rangeFile, { __proto__: { start: 10, end: 2 } }); }, { code: 'ERR_OUT_OF_RANGE', @@ -132,7 +132,7 @@ const rangeFile = fixtures.path('x.txt'); } { - const options = Object.create({ start: 0, end: 0 }); + const options = { __proto__: { start: 0, end: 0 } }; const stream = fs.createReadStream(rangeFile, options); assert.strictEqual(stream.start, 0); assert.strictEqual(stream.end, 0); @@ -157,7 +157,7 @@ const rangeFile = fixtures.path('x.txt'); { let data = ''; let file = - fs.createReadStream(rangeFile, Object.create({ autoClose: false })); + fs.createReadStream(rangeFile, { __proto__: { autoClose: false } }); assert.strictEqual(file.autoClose, false); file.on('data', (chunk) => { data += chunk; }); file.on('end', common.mustCall(function() { @@ -171,7 +171,7 @@ const rangeFile = fixtures.path('x.txt'); function fileNext() { // This will tell us if the fd is usable again or not. - file = fs.createReadStream(null, Object.create({ fd: file.fd, start: 0 })); + file = fs.createReadStream(null, { __proto__: { fd: file.fd, start: 0 } }); file.data = ''; file.on('data', function(data) { file.data += data; @@ -188,7 +188,7 @@ const rangeFile = fixtures.path('x.txt'); // Just to make sure autoClose won't close the stream because of error. { - const options = Object.create({ fd: 13337, autoClose: false }); + const options = { __proto__: { fd: 13337, autoClose: false } }; const file = fs.createReadStream(null, options); file.on('data', common.mustNotCall()); file.on('error', common.mustCall()); diff --git a/tests/node_compat/test/parallel/test-fs-read.js b/tests/node_compat/test/parallel/test-fs-read.js index 3afad7aad1..e8318df1ec 100644 --- a/tests/node_compat/test/parallel/test-fs-read.js +++ b/tests/node_compat/test/parallel/test-fs-read.js @@ -86,7 +86,7 @@ assert.throws( assert.throws( () => fs.read(fd, { buffer: null }, common.mustNotCall()), - /TypeError: Cannot read properties of null \(reading 'byteLength'\)/, + { code: 'ERR_INVALID_ARG_TYPE' }, 'throws when options.buffer is null' ); diff --git a/tests/node_compat/test/parallel/test-fs-readv-sync.js b/tests/node_compat/test/parallel/test-fs-readv-sync.js index 4af09db614..fd0fc8cdaf 100644 --- a/tests/node_compat/test/parallel/test-fs-readv-sync.js +++ b/tests/node_compat/test/parallel/test-fs-readv-sync.js @@ -10,7 +10,6 @@ require('../common'); const assert = require('assert'); const fs = require('fs'); -const path = require('path'); const tmpdir = require('../common/tmpdir'); tmpdir.refresh(); @@ -20,7 +19,7 @@ const expected = 'ümlaut. Лорем 運務ホソモ指及 आपको कर const exptectedBuff = Buffer.from(expected); const expectedLength = exptectedBuff.length; -const filename = path.join(tmpdir.path, 'readv_sync.txt'); +const filename = tmpdir.resolve('readv_sync.txt'); fs.writeFileSync(filename, exptectedBuff); const allocateEmptyBuffers = (combinedLength) => { diff --git a/tests/node_compat/test/parallel/test-fs-readv.js b/tests/node_compat/test/parallel/test-fs-readv.js index 6d1096dbf3..42581cfe8b 100644 --- a/tests/node_compat/test/parallel/test-fs-readv.js +++ b/tests/node_compat/test/parallel/test-fs-readv.js @@ -9,7 +9,6 @@ const common = require('../common'); const assert = require('assert'); -const path = require('path'); const fs = require('fs'); const tmpdir = require('../common/tmpdir'); @@ -18,7 +17,7 @@ tmpdir.refresh(); const expected = 'ümlaut. Лорем 運務ホソモ指及 आपको करने विकास 紙読決多密所 أضف'; let cnt = 0; -const getFileName = () => path.join(tmpdir.path, `readv_${++cnt}.txt`); +const getFileName = () => tmpdir.resolve(`readv_${++cnt}.txt`); const exptectedBuff = Buffer.from(expected); const allocateEmptyBuffers = (combinedLength) => { diff --git a/tests/node_compat/test/parallel/test-fs-rmdir-recursive-sync-warns-not-found.js b/tests/node_compat/test/parallel/test-fs-rmdir-recursive-sync-warns-not-found.js index 175e22f02e..121a66e094 100644 --- a/tests/node_compat/test/parallel/test-fs-rmdir-recursive-sync-warns-not-found.js +++ b/tests/node_compat/test/parallel/test-fs-rmdir-recursive-sync-warns-not-found.js @@ -10,7 +10,6 @@ const common = require('../common'); const tmpdir = require('../common/tmpdir'); const assert = require('assert'); const fs = require('fs'); -const path = require('path'); tmpdir.refresh(); @@ -23,7 +22,7 @@ tmpdir.refresh(); 'DEP0147' ); assert.throws( - () => fs.rmdirSync(path.join(tmpdir.path, 'noexist.txt'), + () => fs.rmdirSync(tmpdir.resolve('noexist.txt'), { recursive: true }), { code: 'ENOENT' } ); diff --git a/tests/node_compat/test/parallel/test-fs-rmdir-recursive-sync-warns-on-file.js b/tests/node_compat/test/parallel/test-fs-rmdir-recursive-sync-warns-on-file.js index b0109c410e..b3f4d1fab0 100644 --- a/tests/node_compat/test/parallel/test-fs-rmdir-recursive-sync-warns-on-file.js +++ b/tests/node_compat/test/parallel/test-fs-rmdir-recursive-sync-warns-on-file.js @@ -10,7 +10,6 @@ const common = require('../common'); const tmpdir = require('../common/tmpdir'); const assert = require('assert'); const fs = require('fs'); -const path = require('path'); tmpdir.refresh(); @@ -21,7 +20,7 @@ tmpdir.refresh(); 'will be removed. Use fs.rm(path, { recursive: true }) instead', 'DEP0147' ); - const filePath = path.join(tmpdir.path, 'rmdir-recursive.txt'); + const filePath = tmpdir.resolve('rmdir-recursive.txt'); fs.writeFileSync(filePath, ''); assert.throws( () => fs.rmdirSync(filePath, { recursive: true }), diff --git a/tests/node_compat/test/parallel/test-fs-rmdir-recursive-throws-not-found.js b/tests/node_compat/test/parallel/test-fs-rmdir-recursive-throws-not-found.js index f8ed34e425..931308aadb 100644 --- a/tests/node_compat/test/parallel/test-fs-rmdir-recursive-throws-not-found.js +++ b/tests/node_compat/test/parallel/test-fs-rmdir-recursive-throws-not-found.js @@ -10,14 +10,13 @@ const common = require('../common'); const tmpdir = require('../common/tmpdir'); const assert = require('assert'); const fs = require('fs'); -const path = require('path'); tmpdir.refresh(); { assert.throws( () => - fs.rmdirSync(path.join(tmpdir.path, 'noexist.txt'), { recursive: true }), + fs.rmdirSync(tmpdir.resolve('noexist.txt'), { recursive: true }), { code: 'ENOENT', } @@ -25,7 +24,7 @@ tmpdir.refresh(); } { fs.rmdir( - path.join(tmpdir.path, 'noexist.txt'), + tmpdir.resolve('noexist.txt'), { recursive: true }, common.mustCall((err) => { assert.strictEqual(err.code, 'ENOENT'); @@ -34,7 +33,7 @@ tmpdir.refresh(); } { assert.rejects( - () => fs.promises.rmdir(path.join(tmpdir.path, 'noexist.txt'), + () => fs.promises.rmdir(tmpdir.resolve('noexist.txt'), { recursive: true }), { code: 'ENOENT', diff --git a/tests/node_compat/test/parallel/test-fs-rmdir-recursive-throws-on-file.js b/tests/node_compat/test/parallel/test-fs-rmdir-recursive-throws-on-file.js index d16539b06b..6a48678bc6 100644 --- a/tests/node_compat/test/parallel/test-fs-rmdir-recursive-throws-on-file.js +++ b/tests/node_compat/test/parallel/test-fs-rmdir-recursive-throws-on-file.js @@ -10,26 +10,25 @@ const common = require('../common'); const tmpdir = require('../common/tmpdir'); const assert = require('assert'); const fs = require('fs'); -const path = require('path'); tmpdir.refresh(); const code = common.isWindows ? 'ENOENT' : 'ENOTDIR'; { - const filePath = path.join(tmpdir.path, 'rmdir-recursive.txt'); + const filePath = tmpdir.resolve('rmdir-recursive.txt'); fs.writeFileSync(filePath, ''); assert.throws(() => fs.rmdirSync(filePath, { recursive: true }), { code }); } { - const filePath = path.join(tmpdir.path, 'rmdir-recursive.txt'); + const filePath = tmpdir.resolve('rmdir-recursive.txt'); fs.writeFileSync(filePath, ''); fs.rmdir(filePath, { recursive: true }, common.mustCall((err) => { assert.strictEqual(err.code, code); })); } { - const filePath = path.join(tmpdir.path, 'rmdir-recursive.txt'); + const filePath = tmpdir.resolve('rmdir-recursive.txt'); fs.writeFileSync(filePath, ''); assert.rejects(() => fs.promises.rmdir(filePath, { recursive: true }), { code }).then(common.mustCall()); diff --git a/tests/node_compat/test/parallel/test-fs-rmdir-recursive-warns-not-found.js b/tests/node_compat/test/parallel/test-fs-rmdir-recursive-warns-not-found.js index 1bd45a313a..2eae8b1e30 100644 --- a/tests/node_compat/test/parallel/test-fs-rmdir-recursive-warns-not-found.js +++ b/tests/node_compat/test/parallel/test-fs-rmdir-recursive-warns-not-found.js @@ -9,7 +9,6 @@ const common = require('../common'); const tmpdir = require('../common/tmpdir'); const fs = require('fs'); -const path = require('path'); tmpdir.refresh(); @@ -22,7 +21,7 @@ tmpdir.refresh(); 'DEP0147' ); fs.rmdir( - path.join(tmpdir.path, 'noexist.txt'), + tmpdir.resolve('noexist.txt'), { recursive: true }, common.mustCall() ); diff --git a/tests/node_compat/test/parallel/test-fs-rmdir-recursive-warns-on-file.js b/tests/node_compat/test/parallel/test-fs-rmdir-recursive-warns-on-file.js index 72adc3c117..89250b048f 100644 --- a/tests/node_compat/test/parallel/test-fs-rmdir-recursive-warns-on-file.js +++ b/tests/node_compat/test/parallel/test-fs-rmdir-recursive-warns-on-file.js @@ -10,7 +10,6 @@ const common = require('../common'); const tmpdir = require('../common/tmpdir'); const assert = require('assert'); const fs = require('fs'); -const path = require('path'); tmpdir.refresh(); @@ -21,7 +20,7 @@ tmpdir.refresh(); 'will be removed. Use fs.rm(path, { recursive: true }) instead', 'DEP0147' ); - const filePath = path.join(tmpdir.path, 'rmdir-recursive.txt'); + const filePath = tmpdir.resolve('rmdir-recursive.txt'); fs.writeFileSync(filePath, ''); fs.rmdir(filePath, { recursive: true }, common.mustCall((err) => { assert.strictEqual(err.code, common.isWindows ? 'ENOENT' : 'ENOTDIR'); diff --git a/tests/node_compat/test/parallel/test-fs-watchfile.js b/tests/node_compat/test/parallel/test-fs-watchfile.js index 7419b276ca..ccbaabe06f 100644 --- a/tests/node_compat/test/parallel/test-fs-watchfile.js +++ b/tests/node_compat/test/parallel/test-fs-watchfile.js @@ -37,7 +37,7 @@ assert.throws(() => { fs.watchFile(new Object(), common.mustNotCall()); }, { code: 'ERR_INVALID_ARG_TYPE', name: 'TypeError' }); -const enoentFile = path.join(tmpdir.path, 'non-existent-file'); +const enoentFile = tmpdir.resolve('non-existent-file'); const expectedStatObject = new fs.Stats( 0, // dev 0, // mode @@ -92,14 +92,14 @@ watcher.on('stop', common.mustCall()); // Watch events should callback with a filename on supported systems. // Omitting AIX. It works but not reliably. if (common.isLinux || common.isOSX || common.isWindows) { - const dir = path.join(tmpdir.path, 'watch'); + const dir = tmpdir.resolve('watch'); fs.mkdir(dir, common.mustCall(function(err) { if (err) assert.fail(err); - fs.watch(dir, common.mustCall(function(eventType, filename) { + const handle = fs.watch(dir, common.mustCall(function(eventType, filename) { clearInterval(interval); - this._handle.close(); + handle.close(); assert.strictEqual(filename, 'foo.txt'); })); diff --git a/tests/node_compat/test/parallel/test-fs-write-buffer.js b/tests/node_compat/test/parallel/test-fs-write-buffer.js index c867d3cd17..13ee5f068c 100644 --- a/tests/node_compat/test/parallel/test-fs-write-buffer.js +++ b/tests/node_compat/test/parallel/test-fs-write-buffer.js @@ -29,7 +29,6 @@ 'use strict'; const common = require('../common'); const assert = require('assert'); -const path = require('path'); const fs = require('fs'); const expected = Buffer.from('hello'); @@ -38,7 +37,7 @@ tmpdir.refresh(); // fs.write with all parameters provided: { - const filename = path.join(tmpdir.path, 'write1.txt'); + const filename = tmpdir.resolve('write1.txt'); fs.open(filename, 'w', 0o644, common.mustSucceed((fd) => { const cb = common.mustSucceed((written) => { assert.strictEqual(written, expected.length); @@ -54,7 +53,7 @@ tmpdir.refresh(); // fs.write with a buffer, without the length parameter: { - const filename = path.join(tmpdir.path, 'write2.txt'); + const filename = tmpdir.resolve('write2.txt'); fs.open(filename, 'w', 0o644, common.mustSucceed((fd) => { const cb = common.mustSucceed((written) => { assert.strictEqual(written, 2); @@ -70,7 +69,7 @@ tmpdir.refresh(); // fs.write with a buffer, without the offset and length parameters: { - const filename = path.join(tmpdir.path, 'write3.txt'); + const filename = tmpdir.resolve('write3.txt'); fs.open(filename, 'w', 0o644, common.mustSucceed((fd) => { const cb = common.mustSucceed((written) => { assert.strictEqual(written, expected.length); @@ -86,7 +85,7 @@ tmpdir.refresh(); // fs.write with the offset passed as undefined followed by the callback: { - const filename = path.join(tmpdir.path, 'write4.txt'); + const filename = tmpdir.resolve('write4.txt'); fs.open(filename, 'w', 0o644, common.mustSucceed((fd) => { const cb = common.mustSucceed((written) => { assert.strictEqual(written, expected.length); @@ -102,7 +101,7 @@ tmpdir.refresh(); // fs.write with offset and length passed as undefined followed by the callback: { - const filename = path.join(tmpdir.path, 'write5.txt'); + const filename = tmpdir.resolve('write5.txt'); fs.open(filename, 'w', 0o644, common.mustSucceed((fd) => { const cb = common.mustSucceed((written) => { assert.strictEqual(written, expected.length); @@ -118,7 +117,7 @@ tmpdir.refresh(); // fs.write with a Uint8Array, without the offset and length parameters: { - const filename = path.join(tmpdir.path, 'write6.txt'); + const filename = tmpdir.resolve('write6.txt'); fs.open(filename, 'w', 0o644, common.mustSucceed((fd) => { const cb = common.mustSucceed((written) => { assert.strictEqual(written, expected.length); @@ -134,7 +133,7 @@ tmpdir.refresh(); // fs.write with invalid offset type { - const filename = path.join(tmpdir.path, 'write7.txt'); + const filename = tmpdir.resolve('write7.txt'); fs.open(filename, 'w', 0o644, common.mustSucceed((fd) => { assert.throws(() => { fs.write(fd, @@ -156,7 +155,7 @@ tmpdir.refresh(); // fs.write with a DataView, without the offset and length parameters: { - const filename = path.join(tmpdir.path, 'write8.txt'); + const filename = tmpdir.resolve('write8.txt'); fs.open(filename, 'w', 0o644, common.mustSucceed((fd) => { const cb = common.mustSucceed((written) => { assert.strictEqual(written, expected.length); diff --git a/tests/node_compat/test/parallel/test-fs-write-file-buffer.js b/tests/node_compat/test/parallel/test-fs-write-file-buffer.js index 6de3eadd50..d0bfd32aa9 100644 --- a/tests/node_compat/test/parallel/test-fs-write-file-buffer.js +++ b/tests/node_compat/test/parallel/test-fs-write-file-buffer.js @@ -28,7 +28,6 @@ 'use strict'; require('../common'); -const join = require('path').join; const util = require('util'); const fs = require('fs'); @@ -57,6 +56,6 @@ const tmpdir = require('../common/tmpdir'); tmpdir.refresh(); const buf = Buffer.from(data, 'base64'); -fs.writeFileSync(join(tmpdir.path, 'test.jpg'), buf); +fs.writeFileSync(tmpdir.resolve('test.jpg'), buf); util.log('Done!'); diff --git a/tests/node_compat/test/parallel/test-fs-write-file-invalid-path.js b/tests/node_compat/test/parallel/test-fs-write-file-invalid-path.js index cec74e7cc4..063f3e4915 100644 --- a/tests/node_compat/test/parallel/test-fs-write-file-invalid-path.js +++ b/tests/node_compat/test/parallel/test-fs-write-file-invalid-path.js @@ -10,7 +10,6 @@ const common = require('../common'); const assert = require('assert'); const fs = require('fs'); -const path = require('path'); if (!common.isWindows) common.skip('This test is for Windows only.'); @@ -25,7 +24,7 @@ const DATA_VALUE = 'hello'; const RESERVED_CHARACTERS = '<>"|?*'; [...RESERVED_CHARACTERS].forEach((ch) => { - const pathname = path.join(tmpdir.path, `somefile_${ch}`); + const pathname = tmpdir.resolve(`somefile_${ch}`); assert.throws( () => { fs.writeFileSync(pathname, DATA_VALUE); @@ -36,7 +35,7 @@ const RESERVED_CHARACTERS = '<>"|?*'; // Test for ':' (NTFS data streams). // Refs: https://msdn.microsoft.com/en-us/library/windows/desktop/bb540537.aspx -const pathname = path.join(tmpdir.path, 'foo:bar'); +const pathname = tmpdir.resolve('foo:bar'); fs.writeFileSync(pathname, DATA_VALUE); let content = ''; diff --git a/tests/node_compat/test/parallel/test-fs-write-file-sync.js b/tests/node_compat/test/parallel/test-fs-write-file-sync.js index d23523ad37..e7da852606 100644 --- a/tests/node_compat/test/parallel/test-fs-write-file-sync.js +++ b/tests/node_compat/test/parallel/test-fs-write-file-sync.js @@ -33,7 +33,6 @@ if (!common.isMainThread) common.skip('Setting process.umask is not supported in Workers'); const assert = require('assert'); -const path = require('path'); const fs = require('fs'); // On Windows chmod is only able to manipulate read-only bit. Test if creating @@ -48,7 +47,7 @@ tmpdir.refresh(); // Test writeFileSync { - const file = path.join(tmpdir.path, 'testWriteFileSync.txt'); + const file = tmpdir.resolve('testWriteFileSync.txt'); fs.writeFileSync(file, '123', { mode }); const content = fs.readFileSync(file, { encoding: 'utf8' }); @@ -58,7 +57,7 @@ tmpdir.refresh(); // Test appendFileSync { - const file = path.join(tmpdir.path, 'testAppendFileSync.txt'); + const file = tmpdir.resolve('testAppendFileSync.txt'); fs.appendFileSync(file, 'abc', { mode }); const content = fs.readFileSync(file, { encoding: 'utf8' }); @@ -84,7 +83,7 @@ tmpdir.refresh(); return _closeSync(...args); }; - const file = path.join(tmpdir.path, 'testWriteFileSyncFd.txt'); + const file = tmpdir.resolve('testWriteFileSyncFd.txt'); const fd = fs.openSync(file, 'w+', mode); fs.writeFileSync(fd, '123'); @@ -101,7 +100,7 @@ tmpdir.refresh(); // Test writeFileSync with flags { - const file = path.join(tmpdir.path, 'testWriteFileSyncFlags.txt'); + const file = tmpdir.resolve('testWriteFileSyncFlags.txt'); fs.writeFileSync(file, 'hello ', { encoding: 'utf8', flag: 'a' }); fs.writeFileSync(file, 'world!', { encoding: 'utf8', flag: 'a' }); @@ -109,20 +108,36 @@ tmpdir.refresh(); assert.strictEqual(content, 'hello world!'); } -// Test writeFileSync with an object with an own toString function +// Test writeFileSync with no flags { - // Runtime deprecated by DEP0162 - common.expectWarning('DeprecationWarning', - 'Implicit coercion of objects with own toString property is deprecated.', - 'DEP0162'); - const file = path.join(tmpdir.path, 'testWriteFileSyncStringify.txt'); - const data = { - toString() { - return 'hello world!'; - } - }; + const utf8Data = 'hello world!'; + for (const test of [ + { data: utf8Data }, + { data: utf8Data, options: { encoding: 'utf8' } }, + { data: Buffer.from(utf8Data, 'utf8').toString('hex'), options: { encoding: 'hex' } }, + ]) { + const file = tmpdir.resolve(`testWriteFileSyncNewFile_${Math.random()}.txt`); + fs.writeFileSync(file, test.data, test.options); - fs.writeFileSync(file, data, { encoding: 'utf8', flag: 'a' }); - const content = fs.readFileSync(file, { encoding: 'utf8' }); - assert.strictEqual(content, String(data)); + const content = fs.readFileSync(file, { encoding: 'utf-8' }); + assert.strictEqual(content, utf8Data); + } +} + +// Test writeFileSync with an invalid input +{ + const file = tmpdir.resolve('testWriteFileSyncInvalid.txt'); + for (const data of [ + false, 5, {}, [], null, undefined, true, 5n, () => {}, Symbol(), new Map(), + new String('notPrimitive'), + { [Symbol.toPrimitive]: (hint) => 'amObject' }, + { toString() { return 'amObject'; } }, + Promise.resolve('amPromise'), + common.mustNotCall(), + ]) { + assert.throws( + () => fs.writeFileSync(file, data, { encoding: 'utf8', flag: 'a' }), + { code: 'ERR_INVALID_ARG_TYPE' } + ); + } } diff --git a/tests/node_compat/test/parallel/test-fs-write-stream-autoclose-option.js b/tests/node_compat/test/parallel/test-fs-write-stream-autoclose-option.js index d4158b4ad7..480f7dcdb3 100644 --- a/tests/node_compat/test/parallel/test-fs-write-stream-autoclose-option.js +++ b/tests/node_compat/test/parallel/test-fs-write-stream-autoclose-option.js @@ -8,12 +8,11 @@ 'use strict'; const common = require('../common'); const assert = require('assert'); -const path = require('path'); const fs = require('fs'); const tmpdir = require('../common/tmpdir'); -const file = path.join(tmpdir.path, 'write-autoclose-opt1.txt'); +const file = tmpdir.resolve('write-autoclose-opt1.txt'); tmpdir.refresh(); let stream = fs.createWriteStream(file, { flags: 'w+', autoClose: false }); stream.write('Test1'); diff --git a/tests/node_compat/test/parallel/test-fs-write-stream-close-without-callback.js b/tests/node_compat/test/parallel/test-fs-write-stream-close-without-callback.js index 9cd1248406..ad685be77f 100644 --- a/tests/node_compat/test/parallel/test-fs-write-stream-close-without-callback.js +++ b/tests/node_compat/test/parallel/test-fs-write-stream-close-without-callback.js @@ -9,12 +9,11 @@ require('../common'); const fs = require('fs'); -const path = require('path'); const tmpdir = require('../common/tmpdir'); tmpdir.refresh(); -const s = fs.createWriteStream(path.join(tmpdir.path, 'nocallback')); +const s = fs.createWriteStream(tmpdir.resolve('nocallback')); s.end('hello world'); s.close(); diff --git a/tests/node_compat/test/parallel/test-fs-write-stream-double-close.js b/tests/node_compat/test/parallel/test-fs-write-stream-double-close.js index ae0f1d8f1e..0f57333081 100644 --- a/tests/node_compat/test/parallel/test-fs-write-stream-double-close.js +++ b/tests/node_compat/test/parallel/test-fs-write-stream-double-close.js @@ -10,20 +10,19 @@ const common = require('../common'); const assert = require('assert'); const fs = require('fs'); -const path = require('path'); const tmpdir = require('../common/tmpdir'); tmpdir.refresh(); { - const s = fs.createWriteStream(path.join(tmpdir.path, 'rw')); + const s = fs.createWriteStream(tmpdir.resolve('rw')); s.close(common.mustCall()); s.close(common.mustCall()); } { - const s = fs.createWriteStream(path.join(tmpdir.path, 'rw2')); + const s = fs.createWriteStream(tmpdir.resolve('rw2')); let emits = 0; s.on('close', () => { @@ -44,7 +43,7 @@ tmpdir.refresh(); } { - const s = fs.createWriteStream(path.join(tmpdir.path, 'rw'), { + const s = fs.createWriteStream(tmpdir.resolve('rw'), { autoClose: false }); diff --git a/tests/node_compat/test/parallel/test-fs-write-stream-end.js b/tests/node_compat/test/parallel/test-fs-write-stream-end.js index d2458cd38c..3221a558e8 100644 --- a/tests/node_compat/test/parallel/test-fs-write-stream-end.js +++ b/tests/node_compat/test/parallel/test-fs-write-stream-end.js @@ -29,21 +29,20 @@ 'use strict'; const common = require('../common'); const assert = require('assert'); -const path = require('path'); const fs = require('fs'); const tmpdir = require('../common/tmpdir'); tmpdir.refresh(); { - const file = path.join(tmpdir.path, 'write-end-test0.txt'); + const file = tmpdir.resolve('write-end-test0.txt'); const stream = fs.createWriteStream(file); stream.end(); stream.on('close', common.mustCall()); } { - const file = path.join(tmpdir.path, 'write-end-test1.txt'); + const file = tmpdir.resolve('write-end-test1.txt'); const stream = fs.createWriteStream(file); stream.end('a\n', 'utf8'); stream.on('close', common.mustCall(function() { @@ -53,7 +52,7 @@ tmpdir.refresh(); } { - const file = path.join(tmpdir.path, 'write-end-test2.txt'); + const file = tmpdir.resolve('write-end-test2.txt'); const stream = fs.createWriteStream(file); stream.end(); diff --git a/tests/node_compat/test/parallel/test-fs-write-stream-fs.js b/tests/node_compat/test/parallel/test-fs-write-stream-fs.js index 44511cf81e..253f5e4252 100644 --- a/tests/node_compat/test/parallel/test-fs-write-stream-fs.js +++ b/tests/node_compat/test/parallel/test-fs-write-stream-fs.js @@ -7,14 +7,13 @@ 'use strict'; const common = require('../common'); -const path = require('path'); const fs = require('fs'); const tmpdir = require('../common/tmpdir'); tmpdir.refresh(); { - const file = path.join(tmpdir.path, 'write-end-test0.txt'); + const file = tmpdir.resolve('write-end-test0.txt'); const stream = fs.createWriteStream(file, { fs: { open: common.mustCall(fs.open), @@ -28,7 +27,7 @@ tmpdir.refresh(); { - const file = path.join(tmpdir.path, 'write-end-test1.txt'); + const file = tmpdir.resolve('write-end-test1.txt'); const stream = fs.createWriteStream(file, { fs: { open: common.mustCall(fs.open), diff --git a/tests/node_compat/test/parallel/test-fs-write-stream-throw-type-error.js b/tests/node_compat/test/parallel/test-fs-write-stream-throw-type-error.js index b60d613b75..988512aa3b 100644 --- a/tests/node_compat/test/parallel/test-fs-write-stream-throw-type-error.js +++ b/tests/node_compat/test/parallel/test-fs-write-stream-throw-type-error.js @@ -9,11 +9,10 @@ require('../common'); const assert = require('assert'); const fs = require('fs'); -const path = require('path'); const tmpdir = require('../common/tmpdir'); -const example = path.join(tmpdir.path, 'dummy'); +const example = tmpdir.resolve('dummy'); tmpdir.refresh(); // Should not throw. diff --git a/tests/node_compat/test/parallel/test-fs-write-stream.js b/tests/node_compat/test/parallel/test-fs-write-stream.js index a1f7150944..107f22af04 100644 --- a/tests/node_compat/test/parallel/test-fs-write-stream.js +++ b/tests/node_compat/test/parallel/test-fs-write-stream.js @@ -29,12 +29,11 @@ 'use strict'; const common = require('../common'); const assert = require('assert'); -const path = require('path'); const fs = require('fs'); const tmpdir = require('../common/tmpdir'); -const file = path.join(tmpdir.path, 'write.txt'); +const file = tmpdir.resolve('write.txt'); tmpdir.refresh(); diff --git a/tests/node_compat/test/parallel/test-fs-write-sync.js b/tests/node_compat/test/parallel/test-fs-write-sync.js index ade0849ce6..e65923102e 100644 --- a/tests/node_compat/test/parallel/test-fs-write-sync.js +++ b/tests/node_compat/test/parallel/test-fs-write-sync.js @@ -29,10 +29,9 @@ 'use strict'; require('../common'); const assert = require('assert'); -const path = require('path'); const fs = require('fs'); const tmpdir = require('../common/tmpdir'); -const filename = path.join(tmpdir.path, 'write.txt'); +const filename = tmpdir.resolve('write.txt'); tmpdir.refresh(); diff --git a/tests/node_compat/test/parallel/test-fs-write.js b/tests/node_compat/test/parallel/test-fs-write.js index 33fcb84cf9..e10db287fb 100644 --- a/tests/node_compat/test/parallel/test-fs-write.js +++ b/tests/node_compat/test/parallel/test-fs-write.js @@ -2,8 +2,8 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 16.13.0 -// This file is automatically generated by "node/_tools/setup.ts". Do not modify this file manually +// Taken from Node 18.12.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. // @@ -30,17 +30,15 @@ 'use strict'; const common = require('../common'); const assert = require('assert'); -const path = require('path'); const fs = require('fs'); const tmpdir = require('../common/tmpdir'); tmpdir.refresh(); -const fn = path.join(tmpdir.path, 'write.txt'); -const fn2 = path.join(tmpdir.path, 'write2.txt'); -const fn3 = path.join(tmpdir.path, 'write3.txt'); -const fn4 = path.join(tmpdir.path, 'write4.txt'); -const fn5 = path.join(tmpdir.path, 'write5.txt'); +const fn = tmpdir.resolve('write.txt'); +const fn2 = tmpdir.resolve('write2.txt'); +const fn3 = tmpdir.resolve('write3.txt'); +const fn4 = tmpdir.resolve('write4.txt'); const expected = 'ümlaut.'; const constants = fs.constants; @@ -106,9 +104,6 @@ fs.open(fn, 'w', 0o644, common.mustSucceed((fd) => { fs.write(fd, '', 0, 'utf8', written); })); -// TODO(kt3k): Enable this test when fs.open supports number for `flags` -// paramter. -/* const args = constants.O_CREAT | constants.O_WRONLY | constants.O_TRUNC; fs.open(fn2, args, 0o644, common.mustSucceed((fd) => { const done = common.mustSucceed((written) => { @@ -126,7 +121,6 @@ fs.open(fn2, args, 0o644, common.mustSucceed((fd) => { fs.write(fd, '', 0, 'utf8', written); })); -*/ fs.open(fn3, 'w', 0o644, common.mustSucceed((fd) => { const done = common.mustSucceed((written) => { @@ -137,17 +131,6 @@ fs.open(fn3, 'w', 0o644, common.mustSucceed((fd) => { fs.write(fd, expected, done); })); -fs.open(fn4, 'w', 0o644, common.mustSucceed((fd) => { - const done = common.mustSucceed((written) => { - assert.strictEqual(written, Buffer.byteLength(expected)); - fs.closeSync(fd); - }); - - const data = { - toString() { return expected; } - }; - fs.write(fd, data, done); -})); [false, 'test', {}, [], null, undefined].forEach((i) => { assert.throws( @@ -166,7 +149,14 @@ fs.open(fn4, 'w', 0o644, common.mustSucceed((fd) => { ); }); -[false, 5, {}, [], null, undefined].forEach((data) => { +[ + false, 5, {}, [], null, undefined, true, 5n, () => {}, Symbol(), new Map(), + new String('notPrimitive'), + { [Symbol.toPrimitive]: (hint) => 'amObject' }, + { toString() { return 'amObject'; } }, + Promise.resolve('amPromise'), + common.mustNotCall(), +].forEach((data) => { assert.throws( () => fs.write(1, data, common.mustNotCall()), { @@ -185,7 +175,7 @@ fs.open(fn4, 'w', 0o644, common.mustSucceed((fd) => { { // Regression test for https://github.com/nodejs/node/issues/38168 - const fd = fs.openSync(fn5, 'w'); + const fd = fs.openSync(fn4, 'w'); assert.throws( () => fs.writeSync(fd, 'abc', 0, 'hex'), diff --git a/tests/node_compat/test/parallel/test-fs-writev-sync.js b/tests/node_compat/test/parallel/test-fs-writev-sync.js index ba90f693aa..35db3675fd 100644 --- a/tests/node_compat/test/parallel/test-fs-writev-sync.js +++ b/tests/node_compat/test/parallel/test-fs-writev-sync.js @@ -9,7 +9,6 @@ require('../common'); const assert = require('assert'); -const path = require('path'); const fs = require('fs'); const tmpdir = require('../common/tmpdir'); @@ -17,7 +16,7 @@ tmpdir.refresh(); const expected = 'ümlaut. Лорем 運務ホソモ指及 आपको करने विकास 紙読決多密所 أضف'; -const getFileName = (i) => path.join(tmpdir.path, `writev_sync_${i}.txt`); +const getFileName = (i) => tmpdir.resolve(`writev_sync_${i}.txt`); /** * Testing with a array of buffers input diff --git a/tests/node_compat/test/parallel/test-http-agent-getname.js b/tests/node_compat/test/parallel/test-http-agent-getname.js index 43dc09f2cd..530cc1378d 100644 --- a/tests/node_compat/test/parallel/test-http-agent-getname.js +++ b/tests/node_compat/test/parallel/test-http-agent-getname.js @@ -10,7 +10,6 @@ require('../common'); const assert = require('assert'); const http = require('http'); -const path = require('path'); const tmpdir = require('../common/tmpdir'); @@ -48,7 +47,7 @@ assert.strictEqual( ); // unix socket -const socketPath = path.join(tmpdir.path, 'foo', 'bar'); +const socketPath = tmpdir.resolve('foo', 'bar'); assert.strictEqual( agent.getName({ socketPath diff --git a/tests/node_compat/test/parallel/test-http-outgoing-internal-headernames-getter.js b/tests/node_compat/test/parallel/test-http-outgoing-internal-headernames-getter.js index 4cca650006..490d814b99 100644 --- a/tests/node_compat/test/parallel/test-http-outgoing-internal-headernames-getter.js +++ b/tests/node_compat/test/parallel/test-http-outgoing-internal-headernames-getter.js @@ -24,7 +24,7 @@ common.expectWarning('DeprecationWarning', warn, 'DEP0066'); // Tests _headerNames getter result after setting a header. const outgoingMessage = new OutgoingMessage(); outgoingMessage.setHeader('key', 'value'); - const expect = Object.create(null); + const expect = { __proto__: null }; expect.key = 'key'; assert.deepStrictEqual(outgoingMessage._headerNames, expect); } diff --git a/tests/node_compat/test/parallel/test-http-url.parse-only-support-http-https-protocol.js b/tests/node_compat/test/parallel/test-http-url.parse-only-support-http-https-protocol.js index bc90d70b4e..98b222f391 100644 --- a/tests/node_compat/test/parallel/test-http-url.parse-only-support-http-https-protocol.js +++ b/tests/node_compat/test/parallel/test-http-url.parse-only-support-http-https-protocol.js @@ -41,7 +41,7 @@ const invalidUrls = [ 'f://some.host/path', ]; -invalidUrls.forEach((invalid) => { +for (const invalid of invalidUrls) { assert.throws( () => { http.request(url.parse(invalid)); }, { @@ -49,4 +49,4 @@ invalidUrls.forEach((invalid) => { name: 'TypeError' } ); -}); +} diff --git a/tests/node_compat/test/parallel/test-net-isipv4.js b/tests/node_compat/test/parallel/test-net-isipv4.js index 1589196d56..cdc9f22ace 100644 --- a/tests/node_compat/test/parallel/test-net-isipv4.js +++ b/tests/node_compat/test/parallel/test-net-isipv4.js @@ -44,10 +44,10 @@ const v4not = [ '192.168.0.2000000000', ]; -v4.forEach((ip) => { +for (const ip of v4) { assert.strictEqual(net.isIPv4(ip), true); -}); +} -v4not.forEach((ip) => { +for (const ip of v4not) { assert.strictEqual(net.isIPv4(ip), false); -}); +} diff --git a/tests/node_compat/test/parallel/test-net-isipv6.js b/tests/node_compat/test/parallel/test-net-isipv6.js index e74239d5d3..752aa5aad7 100644 --- a/tests/node_compat/test/parallel/test-net-isipv6.js +++ b/tests/node_compat/test/parallel/test-net-isipv6.js @@ -242,10 +242,10 @@ const v6not = [ '02001:0000:1234:0000:0000:C1C0:ABCD:0876', ]; -v6.forEach((ip) => { +for (const ip of v6) { assert.strictEqual(net.isIPv6(ip), true); -}); +} -v6not.forEach((ip) => { +for (const ip of v6not) { assert.strictEqual(net.isIPv6(ip), false); -}); +} diff --git a/tests/node_compat/test/parallel/test-parse-args.mjs b/tests/node_compat/test/parallel/test-parse-args.mjs index f8bc14a6c7..0d5aa72f63 100644 --- a/tests/node_compat/test/parallel/test-parse-args.mjs +++ b/tests/node_compat/test/parallel/test-parse-args.mjs @@ -458,7 +458,7 @@ const candidateGreedyOptions = [ '--foo', ]; -candidateGreedyOptions.forEach((value) => { +for (const value of candidateGreedyOptions) { test(`greedy: when short option with value '${value}' then eaten`, () => { const args = ['-w', value]; const options = { with: { type: 'string', short: 'w' } }; @@ -476,7 +476,7 @@ candidateGreedyOptions.forEach((value) => { const result = parseArgs({ args, options, strict: false }); assert.deepStrictEqual(result, expectedResult); }); -}); +} test('strict: when candidate option value is plain text then does not throw', () => { const args = ['--with', 'abc']; @@ -980,7 +980,7 @@ test('tokens:true should not include the default options after the args input', test('proto as default value must be ignored', () => { const args = []; - const options = Object.create(null); + const options = { __proto__: null }; // eslint-disable-next-line no-proto options.__proto__ = { type: 'string', default: 'HELLO' }; diff --git a/tests/node_compat/test/parallel/test-path-extname.js b/tests/node_compat/test/parallel/test-path-extname.js index f5894058b2..8cba90b073 100644 --- a/tests/node_compat/test/parallel/test-path-extname.js +++ b/tests/node_compat/test/parallel/test-path-extname.js @@ -13,7 +13,7 @@ const path = require('path'); const failures = []; const slashRE = /\//g; -[ +const testPaths = [ [__filename, '.js'], ['', ''], ['/path/to/file', ''], @@ -57,10 +57,13 @@ const slashRE = /\//g; ['file//', ''], ['file./', '.'], ['file.//', '.'], -].forEach((test) => { - const expected = test[1]; - [path.posix.extname, path.win32.extname].forEach((extname) => { - let input = test[0]; +]; + +for (const testPath of testPaths) { + const expected = testPath[1]; + const extNames = [path.posix.extname, path.win32.extname]; + for (const extname of extNames) { + let input = testPath[0]; let os; if (extname === path.win32.extname) { input = input.replace(slashRE, '\\'); @@ -73,16 +76,14 @@ const slashRE = /\//g; JSON.stringify(expected)}\n actual=${JSON.stringify(actual)}`; if (actual !== expected) failures.push(`\n${message}`); - }); - { - const input = `C:${test[0].replace(slashRE, '\\')}`; - const actual = path.win32.extname(input); - const message = `path.win32.extname(${JSON.stringify(input)})\n expect=${ - JSON.stringify(expected)}\n actual=${JSON.stringify(actual)}`; - if (actual !== expected) - failures.push(`\n${message}`); } -}); + const input = `C:${testPath[0].replace(slashRE, '\\')}`; + const actual = path.win32.extname(input); + const message = `path.win32.extname(${JSON.stringify(input)})\n expect=${ + JSON.stringify(expected)}\n actual=${JSON.stringify(actual)}`; + if (actual !== expected) + failures.push(`\n${message}`); +} assert.strictEqual(failures.length, 0, failures.join('')); // On Windows, backslash is a path separator. diff --git a/tests/node_compat/test/parallel/test-path-parse-format.js b/tests/node_compat/test/parallel/test-path-parse-format.js index 5b31751f2e..7f4682899e 100644 --- a/tests/node_compat/test/parallel/test-path-parse-format.js +++ b/tests/node_compat/test/parallel/test-path-parse-format.js @@ -231,3 +231,7 @@ function checkFormat(path, testCases) { }); }); } + +// See https://github.com/nodejs/node/issues/44343 +assert.strictEqual(path.format({ name: 'x', ext: 'png' }), 'x.png'); +assert.strictEqual(path.format({ name: 'x', ext: '.png' }), 'x.png'); diff --git a/tests/node_compat/test/parallel/test-path.js b/tests/node_compat/test/parallel/test-path.js index 41b760bff0..2d0a928723 100644 --- a/tests/node_compat/test/parallel/test-path.js +++ b/tests/node_compat/test/parallel/test-path.js @@ -42,8 +42,8 @@ function fail(fn) { }, { code: 'ERR_INVALID_ARG_TYPE', name: 'TypeError' }); } -typeErrorTests.forEach((test) => { - [path.posix, path.win32].forEach((namespace) => { +for (const test of typeErrorTests) { + for (const namespace of [path.posix, path.win32]) { fail(namespace.join, test); fail(namespace.resolve, test); fail(namespace.normalize, test); @@ -59,8 +59,8 @@ typeErrorTests.forEach((test) => { if (test !== undefined) { fail(namespace.basename, 'foo', test); } - }); -}); + } +} // path.sep tests // windows diff --git a/tests/node_compat/test/parallel/test-readline-keys.js b/tests/node_compat/test/parallel/test-readline-keys.js index ec68f7faad..4487e8d711 100644 --- a/tests/node_compat/test/parallel/test-readline-keys.js +++ b/tests/node_compat/test/parallel/test-readline-keys.js @@ -41,9 +41,9 @@ function addTest(sequences, expectedKeys) { keys = []; - sequences.forEach((sequence) => { + for (const sequence of sequences) { fi.write(sequence); - }); + } assert.deepStrictEqual(keys, expectedKeys); } diff --git a/tests/node_compat/test/parallel/test-stream-buffer-list.js b/tests/node_compat/test/parallel/test-stream-buffer-list.js deleted file mode 100644 index 08abd24592..0000000000 --- a/tests/node_compat/test/parallel/test-stream-buffer-list.js +++ /dev/null @@ -1,91 +0,0 @@ -// deno-fmt-ignore-file -// deno-lint-ignore-file - -// Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 -// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. - -// Flags: --expose-internals -'use strict'; -require('../common'); -const assert = require('assert'); -const BufferList = require('internal/streams/buffer_list'); - -// Test empty buffer list. -const emptyList = new BufferList(); - -emptyList.shift(); -assert.deepStrictEqual(emptyList, new BufferList()); - -assert.strictEqual(emptyList.join(','), ''); - -assert.deepStrictEqual(emptyList.concat(0), Buffer.alloc(0)); - -const buf = Buffer.from('foo'); - -function testIterator(list, count) { - // test iterator - let len = 0; - // eslint-disable-next-line no-unused-vars - for (const x of list) { - len++; - } - assert.strictEqual(len, count); -} - -// Test buffer list with one element. -const list = new BufferList(); -testIterator(list, 0); - -list.push(buf); -testIterator(list, 1); -for (const x of list) { - assert.strictEqual(x, buf); -} - -const copy = list.concat(3); -testIterator(copy, 3); - -assert.notStrictEqual(copy, buf); -assert.deepStrictEqual(copy, buf); - -assert.strictEqual(list.join(','), 'foo'); - -const shifted = list.shift(); -testIterator(list, 0); -assert.strictEqual(shifted, buf); -assert.deepStrictEqual(list, new BufferList()); - -{ - const list = new BufferList(); - list.push('foo'); - list.push('bar'); - list.push('foo'); - list.push('bar'); - assert.strictEqual(list.consume(6, true), 'foobar'); - assert.strictEqual(list.consume(6, true), 'foobar'); -} - -{ - const list = new BufferList(); - list.push('foo'); - list.push('bar'); - assert.strictEqual(list.consume(5, true), 'fooba'); -} - -{ - const list = new BufferList(); - list.push(buf); - list.push(buf); - list.push(buf); - list.push(buf); - assert.strictEqual(list.consume(6).toString(), 'foofoo'); - assert.strictEqual(list.consume(6).toString(), 'foofoo'); -} - -{ - const list = new BufferList(); - list.push(buf); - list.push(buf); - assert.strictEqual(list.consume(5).toString(), 'foofo'); -} diff --git a/tests/node_compat/test/parallel/test-stream-readable-destroy.js b/tests/node_compat/test/parallel/test-stream-readable-destroy.js index a8b7b89328..75cec92dc3 100644 --- a/tests/node_compat/test/parallel/test-stream-readable-destroy.js +++ b/tests/node_compat/test/parallel/test-stream-readable-destroy.js @@ -325,7 +325,7 @@ const assert = require('assert'); assert.rejects((async () => { // eslint-disable-next-line no-unused-vars, no-empty for await (const chunk of read) { } - })(), /AbortError/); + })(), /AbortError/).then(common.mustCall()); setTimeout(() => controller.abort(), 0); } diff --git a/tests/node_compat/test/parallel/test-stream-uint8array.js b/tests/node_compat/test/parallel/test-stream-uint8array.js index 3ac81e6729..aa8dbd3d82 100644 --- a/tests/node_compat/test/parallel/test-stream-uint8array.js +++ b/tests/node_compat/test/parallel/test-stream-uint8array.js @@ -45,7 +45,7 @@ const GHI = new Uint8Array([0x47, 0x48, 0x49]); assert(!(chunk instanceof Buffer)); assert(chunk instanceof Uint8Array); assert.strictEqual(chunk, ABC); - assert.strictEqual(encoding, 'utf8'); + assert.strictEqual(encoding, undefined); cb(); }) }); diff --git a/tests/node_compat/test/parallel/test-stream-writable-decoded-encoding.js b/tests/node_compat/test/parallel/test-stream-writable-decoded-encoding.js index e8fbbb0fac..d6c77c9a70 100644 --- a/tests/node_compat/test/parallel/test-stream-writable-decoded-encoding.js +++ b/tests/node_compat/test/parallel/test-stream-writable-decoded-encoding.js @@ -63,3 +63,50 @@ class MyWritable extends stream.Writable { m.write('some-text', 'utf8'); m.end(); } + +{ + assert.throws(() => { + const m = new MyWritable(null, { + defaultEncoding: 'my invalid encoding', + }); + m.end(); + }, { + code: 'ERR_UNKNOWN_ENCODING', + }); +} + +{ + const w = new MyWritable(function(isBuffer, type, enc) { + assert(!isBuffer); + assert.strictEqual(type, 'string'); + assert.strictEqual(enc, 'hex'); + }, { + defaultEncoding: 'hex', + decodeStrings: false + }); + w.write('asd'); + w.end(); +} + +{ + const w = new MyWritable(function(isBuffer, type, enc) { + assert(!isBuffer); + assert.strictEqual(type, 'string'); + assert.strictEqual(enc, 'utf8'); + }, { + defaultEncoding: null, + decodeStrings: false + }); + w.write('asd'); + w.end(); +} + +{ + const m = new MyWritable(function(isBuffer, type, enc) { + assert.strictEqual(type, 'object'); + assert.strictEqual(enc, 'utf8'); + }, { defaultEncoding: 'hex', + objectMode: true }); + m.write({ foo: 'bar' }, 'utf8'); + m.end(); +} diff --git a/tests/node_compat/test/parallel/test-stream-writable-end-cb-error.js b/tests/node_compat/test/parallel/test-stream-writable-end-cb-error.js index f4d5a39958..ecb597f159 100644 --- a/tests/node_compat/test/parallel/test-stream-writable-end-cb-error.js +++ b/tests/node_compat/test/parallel/test-stream-writable-end-cb-error.js @@ -43,7 +43,7 @@ const stream = require('stream'); let called = false; writable.end('asd', common.mustCall((err) => { called = true; - assert.strictEqual(err, undefined); + assert.strictEqual(err, null); })); writable.on('error', common.mustCall((err) => { diff --git a/tests/node_compat/test/parallel/test-stream2-readable-from-list.js b/tests/node_compat/test/parallel/test-stream2-readable-from-list.js deleted file mode 100644 index fea8aefda6..0000000000 --- a/tests/node_compat/test/parallel/test-stream2-readable-from-list.js +++ /dev/null @@ -1,108 +0,0 @@ -// deno-fmt-ignore-file -// deno-lint-ignore-file - -// Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 -// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. - -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -// Flags: --expose-internals -'use strict'; -require('../common'); -const assert = require('assert'); -const fromList = require('stream').Readable._fromList; -const BufferList = require('internal/streams/buffer_list'); -const util = require('util'); - -function bufferListFromArray(arr) { - const bl = new BufferList(); - for (let i = 0; i < arr.length; ++i) - bl.push(arr[i]); - return bl; -} - -{ - // Verify behavior with buffers - let list = [ Buffer.from('foog'), - Buffer.from('bark'), - Buffer.from('bazy'), - Buffer.from('kuel') ]; - list = bufferListFromArray(list); - - assert.strictEqual( - util.inspect([ list ], { compact: false }), - `[ - BufferList { - head: [Object], - tail: [Object], - length: 4 - } -]`); - - // Read more than the first element. - let ret = fromList(6, { buffer: list, length: 16 }); - assert.strictEqual(ret.toString(), 'foogba'); - - // Read exactly the first element. - ret = fromList(2, { buffer: list, length: 10 }); - assert.strictEqual(ret.toString(), 'rk'); - - // Read less than the first element. - ret = fromList(2, { buffer: list, length: 8 }); - assert.strictEqual(ret.toString(), 'ba'); - - // Read more than we have. - ret = fromList(100, { buffer: list, length: 6 }); - assert.strictEqual(ret.toString(), 'zykuel'); - - // all consumed. - assert.deepStrictEqual(list, new BufferList()); -} - -{ - // Verify behavior with strings - let list = [ 'foog', - 'bark', - 'bazy', - 'kuel' ]; - list = bufferListFromArray(list); - - // Read more than the first element. - let ret = fromList(6, { buffer: list, length: 16, decoder: true }); - assert.strictEqual(ret, 'foogba'); - - // Read exactly the first element. - ret = fromList(2, { buffer: list, length: 10, decoder: true }); - assert.strictEqual(ret, 'rk'); - - // Read less than the first element. - ret = fromList(2, { buffer: list, length: 8, decoder: true }); - assert.strictEqual(ret, 'ba'); - - // Read more than we have. - ret = fromList(100, { buffer: list, length: 6, decoder: true }); - assert.strictEqual(ret, 'zykuel'); - - // all consumed. - assert.deepStrictEqual(list, new BufferList()); -} diff --git a/tests/node_compat/test/parallel/test-stream2-writable.js b/tests/node_compat/test/parallel/test-stream2-writable.js index 665ff507f8..4f5ba53fce 100644 --- a/tests/node_compat/test/parallel/test-stream2-writable.js +++ b/tests/node_compat/test/parallel/test-stream2-writable.js @@ -201,7 +201,8 @@ for (let i = 0; i < chunks.length; i++) { { // Verify write callbacks const callbacks = chunks.map(function(chunk, i) { - return [i, function() { + return [i, function(err) { + assert.strictEqual(err, null); callbacks._called[i] = chunk; }]; }).reduce(function(set, x) { @@ -232,7 +233,9 @@ for (let i = 0; i < chunks.length; i++) { { // Verify end() callback const tw = new TestWriter(); - tw.end(common.mustCall()); + tw.end(common.mustCall(function(err) { + assert.strictEqual(err, null); + })); } const helloWorldBuffer = Buffer.from('hello world'); @@ -240,7 +243,9 @@ const helloWorldBuffer = Buffer.from('hello world'); { // Verify end() callback with chunk const tw = new TestWriter(); - tw.end(helloWorldBuffer, common.mustCall()); + tw.end(helloWorldBuffer, common.mustCall(function(err) { + assert.strictEqual(err, null); + })); } { diff --git a/tests/node_compat/test/parallel/test-url-format-whatwg.js b/tests/node_compat/test/parallel/test-url-format-whatwg.js index 9552fd7dad..ff8f1201cf 100644 --- a/tests/node_compat/test/parallel/test-url-format-whatwg.js +++ b/tests/node_compat/test/parallel/test-url-format-whatwg.js @@ -147,3 +147,8 @@ assert.strictEqual( url.format(new URL('http://user:pass@xn--0zwm56d.com:8080/path'), { unicode: true }), 'http://user:pass@测试.com:8080/path' ); + +assert.strictEqual( + url.format(new URL('tel:123')), + url.format(new URL('tel:123'), { unicode: true }) +); diff --git a/tests/node_compat/test/parallel/test-url-parse-invalid-input.js b/tests/node_compat/test/parallel/test-url-parse-invalid-input.js index 98d2d7e2d8..7e8aa5c042 100644 --- a/tests/node_compat/test/parallel/test-url-parse-invalid-input.js +++ b/tests/node_compat/test/parallel/test-url-parse-invalid-input.js @@ -81,3 +81,33 @@ if (common.hasIntl) { (e) => e.code === 'ERR_INVALID_URL', 'parsing http://\u00AD/bad.com/'); } + +/* + FIXME(kt3k): node -e