summaryrefslogtreecommitdiff
path: root/test/parallel
diff options
context:
space:
mode:
authorRich Trott <rtrott@gmail.com>2021-03-26 08:51:08 -0700
committerRich Trott <rtrott@gmail.com>2021-04-01 23:14:29 -0700
commit330f25ef822dac6ed8a0afb3422bd920726eb43d (patch)
treebbf90ca3116946aba033d510364e0dbf209ae5b6 /test/parallel
parentf0bf37317604061dc60ebf858d6ad4dfc313dcdc (diff)
downloadnode-new-330f25ef822dac6ed8a0afb3422bd920726eb43d.tar.gz
test: prepare for consistent comma-dangle lint rule
Make changes so that tests will pass when the comma-dangle settings applied to the rest of the code base are also applied to tests. PR-URL: https://github.com/nodejs/node/pull/37930 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Derek Lewis <DerekNonGeneric@inf.is>
Diffstat (limited to 'test/parallel')
-rw-r--r--test/parallel/test-abortcontroller.js4
-rw-r--r--test/parallel/test-assert-deep.js2
-rw-r--r--test/parallel/test-assert-typedarray-deepequal.js10
-rw-r--r--test/parallel/test-assert.js10
-rw-r--r--test/parallel/test-binding-constants.js2
-rw-r--r--test/parallel/test-blob.js2
-rw-r--r--test/parallel/test-blocklist.js2
-rw-r--r--test/parallel/test-buffer-backing-arraybuffer.js2
-rw-r--r--test/parallel/test-buffer-bytelength.js2
-rw-r--r--test/parallel/test-buffer-failed-alloc-typed-arrays.js2
-rw-r--r--test/parallel/test-buffer-fill.js2
-rw-r--r--test/parallel/test-buffer-from.js2
-rw-r--r--test/parallel/test-buffer-includes.js2
-rw-r--r--test/parallel/test-buffer-indexof.js2
-rw-r--r--test/parallel/test-buffer-isencoding.js4
-rw-r--r--test/parallel/test-buffer-iterator.js2
-rw-r--r--test/parallel/test-buffer-slice.js8
-rw-r--r--test/parallel/test-buffer-write.js2
-rw-r--r--test/parallel/test-buffer-writedouble.js18
-rw-r--r--test/parallel/test-buffer-writeint.js14
-rw-r--r--test/parallel/test-buffer-zero-fill-cli.js2
-rw-r--r--test/parallel/test-child-process-can-write-to-stdout.js2
-rw-r--r--test/parallel/test-child-process-exec-timeout.js2
-rw-r--r--test/parallel/test-child-process-execfilesync-maxbuf.js2
-rw-r--r--test/parallel/test-child-process-execsync-maxbuf.js2
-rw-r--r--test/parallel/test-child-process-fork-args.js6
-rw-r--r--test/parallel/test-child-process-recv-handle.js2
-rw-r--r--test/parallel/test-child-process-spawnsync-input.js2
-rw-r--r--test/parallel/test-child-process-spawnsync-maxbuf.js2
-rw-r--r--test/parallel/test-child-process-spawnsync.js2
-rw-r--r--test/parallel/test-child-process-validate-stdio.js2
-rw-r--r--test/parallel/test-cli-options-precedence.js4
-rw-r--r--test/parallel/test-cli-syntax-piped-bad.js2
-rw-r--r--test/parallel/test-cli-syntax-piped-good.js2
-rw-r--r--test/parallel/test-cluster-worker-exit.js2
-rw-r--r--test/parallel/test-common-countdown.js2
-rw-r--r--test/parallel/test-common.js6
-rw-r--r--test/parallel/test-console-tty-colors.js2
-rw-r--r--test/parallel/test-console.js4
-rw-r--r--test/parallel/test-crypto-authenticated.js8
-rw-r--r--test/parallel/test-crypto-binary-default.js6
-rw-r--r--test/parallel/test-crypto-cipher-decipher.js4
-rw-r--r--test/parallel/test-crypto-dh.js4
-rw-r--r--test/parallel/test-crypto-hmac.js8
-rw-r--r--test/parallel/test-crypto-key-objects.js12
-rw-r--r--test/parallel/test-crypto-keygen.js2
-rw-r--r--test/parallel/test-crypto-random.js10
-rw-r--r--test/parallel/test-crypto-randomuuid.js2
-rw-r--r--test/parallel/test-crypto-scrypt.js4
-rw-r--r--test/parallel/test-crypto-sign-verify.js12
-rw-r--r--test/parallel/test-crypto-x509.js2
-rw-r--r--test/parallel/test-crypto.js4
-rw-r--r--test/parallel/test-dgram-createSocket-type.js4
-rw-r--r--test/parallel/test-dgram-deprecation-error.js6
-rw-r--r--test/parallel/test-dns-lookup-promises.js14
-rw-r--r--test/parallel/test-dns-lookup.js2
-rw-r--r--test/parallel/test-dns-multi-channel.js2
-rw-r--r--test/parallel/test-dns-resolveany.js2
-rw-r--r--test/parallel/test-dns-setservers-type-check.js10
-rw-r--r--test/parallel/test-dns.js6
-rw-r--r--test/parallel/test-domain-abort-on-uncaught.js2
-rw-r--r--test/parallel/test-domain-error-types.js2
-rw-r--r--test/parallel/test-domain-multiple-errors.js2
-rw-r--r--test/parallel/test-env-newprotomethod-remove-unnecessary-prototypes.js2
-rw-r--r--test/parallel/test-err-name-deprecation.js2
-rw-r--r--test/parallel/test-eslint-alphabetize-errors.js4
-rw-r--r--test/parallel/test-eslint-crypto-check.js4
-rw-r--r--test/parallel/test-eslint-documented-errors.js6
-rw-r--r--test/parallel/test-eslint-eslint-check.js4
-rw-r--r--test/parallel/test-eslint-inspector-check.js4
-rw-r--r--test/parallel/test-eslint-no-unescaped-regexp-dot.js4
-rw-r--r--test/parallel/test-eslint-prefer-assert-iferror.js4
-rw-r--r--test/parallel/test-eslint-prefer-assert-methods.js4
-rw-r--r--test/parallel/test-eslint-prefer-common-mustnotcall.js4
-rw-r--r--test/parallel/test-eslint-prefer-common-mustsucceed.js4
-rw-r--r--test/parallel/test-eslint-prefer-util-format-errors.js4
-rw-r--r--test/parallel/test-eslint-require-common-first.js4
-rw-r--r--test/parallel/test-eslint-required-modules.js2
-rw-r--r--test/parallel/test-eval-strict-referenceerror.js2
-rw-r--r--test/parallel/test-event-emitter-special-event-names.js2
-rw-r--r--test/parallel/test-event-on-async-iterator.js6
-rw-r--r--test/parallel/test-eventtarget.js6
-rw-r--r--test/parallel/test-fs-access.js4
-rw-r--r--test/parallel/test-fs-append-file-sync.js2
-rw-r--r--test/parallel/test-fs-buffertype-writesync.js2
-rw-r--r--test/parallel/test-fs-filehandle.js4
-rw-r--r--test/parallel/test-fs-promises-file-handle-write.js2
-rw-r--r--test/parallel/test-fs-promises-watch.js2
-rw-r--r--test/parallel/test-fs-promises.js2
-rw-r--r--test/parallel/test-fs-read-stream-throw-type-error.js4
-rw-r--r--test/parallel/test-fs-realpath-pipe.js2
-rw-r--r--test/parallel/test-fs-realpath.js18
-rw-r--r--test/parallel/test-fs-symlink-dir.js4
-rw-r--r--test/parallel/test-fs-syncwritestream.js2
-rw-r--r--test/parallel/test-fs-utils-get-dirents.js4
-rw-r--r--test/parallel/test-fs-watch.js2
-rw-r--r--test/parallel/test-global.js2
-rw-r--r--test/parallel/test-heapsnapshot-near-heap-limit-bounded.js2
-rw-r--r--test/parallel/test-heapsnapshot-near-heap-limit-worker.js2
-rw-r--r--test/parallel/test-heapsnapshot-near-heap-limit.js8
-rw-r--r--test/parallel/test-http-client-headers-array.js6
-rw-r--r--test/parallel/test-http-client-parse-error.js2
-rw-r--r--test/parallel/test-http-debug.js2
-rw-r--r--test/parallel/test-http-default-port.js2
-rw-r--r--test/parallel/test-http-header-validators.js2
-rw-r--r--test/parallel/test-http-host-header-ipv6-fail.js2
-rw-r--r--test/parallel/test-http-invalidheaderfield2.js8
-rw-r--r--test/parallel/test-http-max-headers-count.js4
-rw-r--r--test/parallel/test-http-mutable-headers.js4
-rw-r--r--test/parallel/test-http-parser-freed-before-upgrade.js2
-rw-r--r--test/parallel/test-http-parser-lazy-loaded.js2
-rw-r--r--test/parallel/test-http-perf_hooks.js2
-rw-r--r--test/parallel/test-http-proxy.js2
-rw-r--r--test/parallel/test-http-raw-headers.js12
-rw-r--r--test/parallel/test-http-response-multiheaders.js2
-rw-r--r--test/parallel/test-http-response-status-message.js2
-rw-r--r--test/parallel/test-http-server-keepalive-end.js2
-rw-r--r--test/parallel/test-http-server-keepalive-req-gc.js2
-rw-r--r--test/parallel/test-http-should-keep-alive.js4
-rw-r--r--test/parallel/test-http-upgrade-client.js4
-rw-r--r--test/parallel/test-http-url.parse-only-support-http-https-protocol.js2
-rw-r--r--test/parallel/test-http2-altsvc.js2
-rw-r--r--test/parallel/test-http2-client-destroy.js2
-rw-r--r--test/parallel/test-http2-client-onconnect-errors.js2
-rw-r--r--test/parallel/test-http2-client-settings-before-connect.js2
-rw-r--r--test/parallel/test-http2-client-write-empty-string.js2
-rw-r--r--test/parallel/test-http2-compat-serverrequest-trailers.js2
-rw-r--r--test/parallel/test-http2-compat-serverresponse-destroy.js2
-rw-r--r--test/parallel/test-http2-compat-serverresponse-headers.js2
-rw-r--r--test/parallel/test-http2-compat-serverresponse-writehead-array.js2
-rw-r--r--test/parallel/test-http2-cookies.js2
-rw-r--r--test/parallel/test-http2-create-client-connect.js4
-rw-r--r--test/parallel/test-http2-debug.js2
-rw-r--r--test/parallel/test-http2-error-order.js2
-rw-r--r--test/parallel/test-http2-getpackedsettings.js10
-rw-r--r--test/parallel/test-http2-misbehaving-flow-control-paused.js4
-rw-r--r--test/parallel/test-http2-misbehaving-flow-control.js4
-rw-r--r--test/parallel/test-http2-misused-pseudoheaders.js2
-rw-r--r--test/parallel/test-http2-multiheaders-raw.js2
-rw-r--r--test/parallel/test-http2-origin.js2
-rw-r--r--test/parallel/test-http2-server-push-stream-errors.js2
-rw-r--r--test/parallel/test-http2-server-rst-stream.js2
-rw-r--r--test/parallel/test-http2-server-shutdown-options-errors.js2
-rw-r--r--test/parallel/test-http2-session-settings.js2
-rw-r--r--test/parallel/test-http2-single-headers.js2
-rw-r--r--test/parallel/test-http2-tls-disconnect.js2
-rw-r--r--test/parallel/test-http2-util-asserts.js4
-rw-r--r--test/parallel/test-http2-util-headers-list.js10
-rw-r--r--test/parallel/test-http2-window-size.js2
-rw-r--r--test/parallel/test-https-agent-session-reuse.js2
-rw-r--r--test/parallel/test-https-max-headers-count.js4
-rw-r--r--test/parallel/test-https-options-boolean-check.js6
-rw-r--r--test/parallel/test-inspect-async-hook-setup-at-inspect.js4
-rw-r--r--test/parallel/test-inspect-publish-uid.js2
-rw-r--r--test/parallel/test-inspector-connect-main-thread.js2
-rw-r--r--test/parallel/test-inspector-esm.js2
-rw-r--r--test/parallel/test-inspector-multisession-ws.js4
-rw-r--r--test/parallel/test-internal-module-require.js2
-rw-r--r--test/parallel/test-internal-util-decorate-error-stack.js2
-rw-r--r--test/parallel/test-internal-util-normalizeencoding.js2
-rw-r--r--test/parallel/test-internal-validators-validateport.js2
-rw-r--r--test/parallel/test-kill-segfault-freebsd.js2
-rw-r--r--test/parallel/test-macos-app-sandbox.js4
-rw-r--r--test/parallel/test-microtask-queue-integration.js2
-rw-r--r--test/parallel/test-module-circular-dependency-warning.js2
-rw-r--r--test/parallel/test-module-nodemodulepaths.js20
-rw-r--r--test/parallel/test-net-connect-options-fd.js2
-rw-r--r--test/parallel/test-net-connect-options-port.js2
-rw-r--r--test/parallel/test-net-isipv4.js4
-rw-r--r--test/parallel/test-net-isipv6.js4
-rw-r--r--test/parallel/test-net-server-listen-options.js2
-rw-r--r--test/parallel/test-net-socket-timeout.js4
-rw-r--r--test/parallel/test-net-write-arguments.js2
-rw-r--r--test/parallel/test-os-process-priority.js2
-rw-r--r--test/parallel/test-path-join.js10
-rw-r--r--test/parallel/test-path-parse-format.js22
-rw-r--r--test/parallel/test-path-relative.js10
-rw-r--r--test/parallel/test-path-resolve.js10
-rw-r--r--test/parallel/test-performance-gc.js2
-rw-r--r--test/parallel/test-policy-parse-integrity.js2
-rw-r--r--test/parallel/test-policy-scopes-dependencies.js2
-rw-r--r--test/parallel/test-policy-scopes-integrity.js2
-rw-r--r--test/parallel/test-preload.js2
-rw-r--r--test/parallel/test-process-cpuUsage.js6
-rw-r--r--test/parallel/test-process-emit-warning-from-native.js4
-rw-r--r--test/parallel/test-process-emitwarning.js4
-rw-r--r--test/parallel/test-process-env-allowed-flags.js2
-rw-r--r--test/parallel/test-process-versions.js2
-rw-r--r--test/parallel/test-process-wrap.js4
-rw-r--r--test/parallel/test-promise-swallowed-event.js2
-rw-r--r--test/parallel/test-promises-unhandled-symbol-rejections.js2
-rw-r--r--test/parallel/test-punycode.js2
-rw-r--r--test/parallel/test-querystring.js20
-rw-r--r--test/parallel/test-readable-from.js2
-rw-r--r--test/parallel/test-readline-async-iterators-destroy.js2
-rw-r--r--test/parallel/test-readline-async-iterators.js2
-rw-r--r--test/parallel/test-readline-emit-keypress-events.js2
-rw-r--r--test/parallel/test-readline-interface-escapecodetimeout.js2
-rw-r--r--test/parallel/test-readline-interface.js6
-rw-r--r--test/parallel/test-readline-keys.js6
-rw-r--r--test/parallel/test-readline-reopen.js2
-rw-r--r--test/parallel/test-readline-tab-complete.js4
-rw-r--r--test/parallel/test-readline.js2
-rw-r--r--test/parallel/test-repl-domain.js2
-rw-r--r--test/parallel/test-repl-dynamic-import.js2
-rw-r--r--test/parallel/test-repl-editor.js4
-rw-r--r--test/parallel/test-repl-envvars.js2
-rw-r--r--test/parallel/test-repl-history-navigation.js22
-rw-r--r--test/parallel/test-repl-inspect-defaults.js2
-rw-r--r--test/parallel/test-repl-inspector.js2
-rw-r--r--test/parallel/test-repl-persistent-history.js6
-rw-r--r--test/parallel/test-repl-preprocess-top-level-await.js2
-rw-r--r--test/parallel/test-repl-pretty-custom-stack.js2
-rw-r--r--test/parallel/test-repl-pretty-stack.js2
-rw-r--r--test/parallel/test-repl-preview.js20
-rw-r--r--test/parallel/test-repl-programmatic-history.js8
-rw-r--r--test/parallel/test-repl-reverse-search.js12
-rw-r--r--test/parallel/test-repl-save-load.js4
-rw-r--r--test/parallel/test-repl-tab-complete.js36
-rw-r--r--test/parallel/test-repl-top-level-await.js14
-rw-r--r--test/parallel/test-repl-uncaught-exception-standalone.js2
-rw-r--r--test/parallel/test-repl-uncaught-exception.js2
-rw-r--r--test/parallel/test-repl-underscore.js10
-rw-r--r--test/parallel/test-repl-use-global.js2
-rw-r--r--test/parallel/test-repl.js50
-rw-r--r--test/parallel/test-require-extension-over-directory.js2
-rw-r--r--test/parallel/test-resource-usage.js2
-rw-r--r--test/parallel/test-source-map-enable.js38
-rw-r--r--test/parallel/test-stream-pipeline-process.js2
-rw-r--r--test/parallel/test-stream-pipeline.js4
-rw-r--r--test/parallel/test-stream-promises.js2
-rw-r--r--test/parallel/test-stream-writev.js4
-rw-r--r--test/parallel/test-stream2-objects.js6
-rw-r--r--test/parallel/test-stream2-transform.js4
-rw-r--r--test/parallel/test-string-decoder-fuzz.js2
-rw-r--r--test/parallel/test-timers-active.js2
-rw-r--r--test/parallel/test-timers-enroll-invalid-msecs.js4
-rw-r--r--test/parallel/test-timers-interval-promisified.js2
-rw-r--r--test/parallel/test-timers.js2
-rw-r--r--test/parallel/test-tls-cipher-list.js2
-rw-r--r--test/parallel/test-tls-client-verify.js8
-rw-r--r--test/parallel/test-tls-cnnic-whitelist.js2
-rw-r--r--test/parallel/test-tls-ecdh-multiple.js2
-rw-r--r--test/parallel/test-tls-getprotocol.js2
-rw-r--r--test/parallel/test-tls-multi-pfx.js2
-rw-r--r--test/parallel/test-tls-options-boolean-check.js10
-rw-r--r--test/parallel/test-tls-psk-server.js2
-rw-r--r--test/parallel/test-tls-server-verify.js14
-rw-r--r--test/parallel/test-tls-session-cache.js2
-rw-r--r--test/parallel/test-tls-set-secure-context.js2
-rw-r--r--test/parallel/test-tls-startcom-wosign-whitelist.js2
-rw-r--r--test/parallel/test-tls-write-error.js2
-rw-r--r--test/parallel/test-trace-events-api.js4
-rw-r--r--test/parallel/test-trace-events-bootstrap.js4
-rw-r--r--test/parallel/test-trace-events-console.js4
-rw-r--r--test/parallel/test-trace-events-environment.js4
-rw-r--r--test/parallel/test-trace-events-file-pattern.js2
-rw-r--r--test/parallel/test-trace-events-promises.js2
-rw-r--r--test/parallel/test-trace-events-vm.js4
-rw-r--r--test/parallel/test-tracing-no-crash.js2
-rw-r--r--test/parallel/test-tty-backwards-api.js2
-rw-r--r--test/parallel/test-url-domain-ascii-unicode.js2
-rw-r--r--test/parallel/test-url-format-invalid-input.js2
-rw-r--r--test/parallel/test-url-parse-invalid-input.js2
-rw-r--r--test/parallel/test-url-pathtofileurl.js2
-rw-r--r--test/parallel/test-url-relative.js6
-rw-r--r--test/parallel/test-util-callbackify.js2
-rw-r--r--test/parallel/test-util-format.js2
-rw-r--r--test/parallel/test-util-inspect.js52
-rw-r--r--test/parallel/test-util-log.js2
-rw-r--r--test/parallel/test-util-promisify.js2
-rw-r--r--test/parallel/test-util-types.js30
-rw-r--r--test/parallel/test-v8-coverage.js18
-rw-r--r--test/parallel/test-v8-serdes.js2
-rw-r--r--test/parallel/test-v8-stats.js2
-rw-r--r--test/parallel/test-validators.js4
-rw-r--r--test/parallel/test-vm-context.js2
-rw-r--r--test/parallel/test-vm-is-context.js2
-rw-r--r--test/parallel/test-vm-module-errors.js4
-rw-r--r--test/parallel/test-vm-module-import-meta.js2
-rw-r--r--test/parallel/test-vm-sigint-existing-handler.js2
-rw-r--r--test/parallel/test-vm-syntax-error-message.js2
-rw-r--r--test/parallel/test-vm-syntax-error-stderr.js2
-rw-r--r--test/parallel/test-webcrypto-derivebits-ecdh.js4
-rw-r--r--test/parallel/test-webcrypto-derivebits-hkdf.js4
-rw-r--r--test/parallel/test-webcrypto-derivebits-node-dh.js4
-rw-r--r--test/parallel/test-webcrypto-derivebits-pbkdf2.js4
-rw-r--r--test/parallel/test-webcrypto-derivebits.js10
-rw-r--r--test/parallel/test-webcrypto-derivekey-ecdh.js4
-rw-r--r--test/parallel/test-webcrypto-derivekey.js12
-rw-r--r--test/parallel/test-webcrypto-digest.js2
-rw-r--r--test/parallel/test-webcrypto-ed25519-ed448.js18
-rw-r--r--test/parallel/test-webcrypto-encrypt-decrypt-rsa.js2
-rw-r--r--test/parallel/test-webcrypto-export-import-dsa.js4
-rw-r--r--test/parallel/test-webcrypto-export-import-ec.js10
-rw-r--r--test/parallel/test-webcrypto-export-import-rsa.js10
-rw-r--r--test/parallel/test-webcrypto-export-import.js12
-rw-r--r--test/parallel/test-webcrypto-keygen.js56
-rw-r--r--test/parallel/test-webcrypto-sign-verify-ecdsa.js6
-rw-r--r--test/parallel/test-webcrypto-sign-verify-hmac.js6
-rw-r--r--test/parallel/test-webcrypto-sign-verify-node-dsa.js6
-rw-r--r--test/parallel/test-webcrypto-sign-verify-rsa.js8
-rw-r--r--test/parallel/test-webcrypto-wrap-unwrap.js4
-rw-r--r--test/parallel/test-webcrypto-x25519-x448.js4
-rw-r--r--test/parallel/test-whatwg-encoding-custom-api-basics.js6
-rw-r--r--test/parallel/test-whatwg-encoding-custom-fatal-streaming.js2
-rw-r--r--test/parallel/test-whatwg-encoding-custom-internals.js70
-rw-r--r--test/parallel/test-whatwg-encoding-custom-textdecoder-api-invalid-label.js2
-rw-r--r--test/parallel/test-whatwg-encoding-custom-textdecoder-ignorebom.js2
-rw-r--r--test/parallel/test-whatwg-encoding-custom-textdecoder-utf16-surrogates.js2
-rw-r--r--test/parallel/test-whatwg-url-custom-parsing.js2
-rw-r--r--test/parallel/test-whatwg-url-custom-properties.js2
-rw-r--r--test/parallel/test-worker-cleanexit-with-moduleload.js2
-rw-r--r--test/parallel/test-worker-debug.js4
-rw-r--r--test/parallel/test-worker-message-event.js12
-rw-r--r--test/parallel/test-worker-message-port-multiple-sharedarraybuffers.js2
-rw-r--r--test/parallel/test-worker-message-port.js2
-rw-r--r--test/parallel/test-worker-process-argv.js2
-rw-r--r--test/parallel/test-worker-type-check.js2
-rw-r--r--test/parallel/test-zlib-bytes-read.js2
-rw-r--r--test/parallel/test-zlib-const.js10
-rw-r--r--test/parallel/test-zlib-convenience-methods.js2
-rw-r--r--test/parallel/test-zlib-dictionary.js4
-rw-r--r--test/parallel/test-zlib-empty-buffer.js2
-rw-r--r--test/parallel/test-zlib-flush-write-sync-interleaved.js2
-rw-r--r--test/parallel/test-zlib-from-concatenated-gzip.js6
-rw-r--r--test/parallel/test-zlib-from-gzip-with-trailing-garbage.js6
-rw-r--r--test/parallel/test-zlib-invalid-input.js4
-rw-r--r--test/parallel/test-zlib-not-string-or-buffer.js2
-rw-r--r--test/parallel/test-zlib-premature-end.js4
-rw-r--r--test/parallel/test-zlib-reset-before-write.js2
-rw-r--r--test/parallel/test-zlib-truncated.js2
-rw-r--r--test/parallel/test-zlib-unzip-one-byte-chunks.js2
333 files changed, 827 insertions, 827 deletions
diff --git a/test/parallel/test-abortcontroller.js b/test/parallel/test-abortcontroller.js
index d26ec8641a..2f4fb495c7 100644
--- a/test/parallel/test-abortcontroller.js
+++ b/test/parallel/test-abortcontroller.js
@@ -92,7 +92,7 @@ const { ok, strictEqual, throws } = require('assert');
NaN,
true,
'AbortController',
- Object.create(AbortController.prototype)
+ Object.create(AbortController.prototype),
];
for (const badController of badAbortControllers) {
throws(
@@ -123,7 +123,7 @@ const { ok, strictEqual, throws } = require('assert');
NaN,
true,
'AbortSignal',
- Object.create(AbortSignal.prototype)
+ Object.create(AbortSignal.prototype),
];
for (const badSignal of badAbortSignals) {
throws(
diff --git a/test/parallel/test-assert-deep.js b/test/parallel/test-assert-deep.js
index b14179c85c..c74ca48d26 100644
--- a/test/parallel/test-assert-deep.js
+++ b/test/parallel/test-assert-deep.js
@@ -164,7 +164,7 @@ assert.throws(
new Int32Array([1]), // Int32Array
new Uint32Array([1]), // Uint32Array
Buffer.from([1]), // Uint8Array
- (function() { return arguments; })(1)
+ (function() { return arguments; })(1),
]);
for (const a of similar) {
diff --git a/test/parallel/test-assert-typedarray-deepequal.js b/test/parallel/test-assert-typedarray-deepequal.js
index 6be4c10595..a31da2739a 100644
--- a/test/parallel/test-assert-typedarray-deepequal.js
+++ b/test/parallel/test-assert-typedarray-deepequal.js
@@ -25,12 +25,12 @@ const equalArrayPairs = [
[new Uint16Array([1, 2, 3, 4]).subarray(1), new Uint16Array([2, 3, 4])],
[new Uint32Array([1, 2, 3, 4]).subarray(1, 3), new Uint32Array([2, 3])],
[new ArrayBuffer(3), new ArrayBuffer(3)],
- [new SharedArrayBuffer(3), new SharedArrayBuffer(3)]
+ [new SharedArrayBuffer(3), new SharedArrayBuffer(3)],
];
const looseEqualArrayPairs = [
[new Float32Array([+0.0]), new Float32Array([-0.0])],
- [new Float64Array([+0.0]), new Float64Array([-0.0])]
+ [new Float64Array([+0.0]), new Float64Array([-0.0])],
];
const notEqualArrayPairs = [
@@ -52,15 +52,15 @@ const notEqualArrayPairs = [
[new Uint8Array([1, 2, 3]).buffer, new Uint8Array([4, 5, 6]).buffer],
[
new Uint8Array(new SharedArrayBuffer(3)).fill(1).buffer,
- new Uint8Array(new SharedArrayBuffer(3)).fill(2).buffer
+ new Uint8Array(new SharedArrayBuffer(3)).fill(2).buffer,
],
[new ArrayBuffer(2), new ArrayBuffer(3)],
[new SharedArrayBuffer(2), new SharedArrayBuffer(3)],
[new ArrayBuffer(2), new SharedArrayBuffer(3)],
[
new Uint8Array(new ArrayBuffer(3)).fill(1).buffer,
- new Uint8Array(new SharedArrayBuffer(3)).fill(2).buffer
- ]
+ new Uint8Array(new SharedArrayBuffer(3)).fill(2).buffer,
+ ],
];
equalArrayPairs.forEach((arrayPair) => {
diff --git a/test/parallel/test-assert.js b/test/parallel/test-assert.js
index 7613449c92..80a55094b7 100644
--- a/test/parallel/test-assert.js
+++ b/test/parallel/test-assert.js
@@ -592,7 +592,7 @@ a.throws(
'...',
' 1,',
' 1',
- ' ]'
+ ' ]',
].join('\n');
assert.throws(
() => assert.deepEqual(
@@ -613,7 +613,7 @@ a.throws(
' 1,',
' 1,',
' 1',
- ' ]'
+ ' ]',
].join('\n');
assert.throws(
() => assert.deepEqual(
@@ -634,7 +634,7 @@ a.throws(
' 0,',
'+ 1,',
' 1',
- ' ]'
+ ' ]',
].join('\n');
assert.throws(
() => assert.deepEqual(
@@ -665,7 +665,7 @@ a.throws(
'+ 1,',
' 2,',
' 1',
- ' ]'
+ ' ]',
].join('\n');
assert.throws(
() => assert.deepEqual([1, 2, 1], [2, 1]),
@@ -946,7 +946,7 @@ assert.throws(
[
1,
false,
- Symbol()
+ Symbol(),
].forEach((input) => {
assert.throws(
() => assert.throws(() => {}, input),
diff --git a/test/parallel/test-binding-constants.js b/test/parallel/test-binding-constants.js
index e989e09b3c..4a96b7c744 100644
--- a/test/parallel/test-binding-constants.js
+++ b/test/parallel/test-binding-constants.js
@@ -29,5 +29,5 @@ function test(obj) {
[
constants, constants.crypto, constants.fs, constants.os, constants.trace,
- constants.zlib, constants.os.dlopen, constants.os.errno, constants.os.signals
+ constants.zlib, constants.os.dlopen, constants.os.errno, constants.os.signals,
].forEach(test);
diff --git a/test/parallel/test-blob.js b/test/parallel/test-blob.js
index ab13d59659..359ce3ba21 100644
--- a/test/parallel/test-blob.js
+++ b/test/parallel/test-blob.js
@@ -100,7 +100,7 @@ assert.throws(() => new Blob({}), {
'e',
'l',
'lo',
- Buffer.from('world')
+ Buffer.from('world'),
]);
assert.strictEqual(b.size, 10);
b.text().then(common.mustCall((text) => {
diff --git a/test/parallel/test-blocklist.js b/test/parallel/test-blocklist.js
index 0d537574c7..9ea376089e 100644
--- a/test/parallel/test-blocklist.js
+++ b/test/parallel/test-blocklist.js
@@ -107,7 +107,7 @@ const util = require('util');
const rulesCheck = [
'Subnet: IPv6 8592:757c:efae:4e45::/64',
'Range: IPv4 10.0.0.1-10.0.0.10',
- 'Address: IPv4 1.1.1.1'
+ 'Address: IPv4 1.1.1.1',
];
assert.deepStrictEqual(blockList.rules, rulesCheck);
console.log(blockList);
diff --git a/test/parallel/test-buffer-backing-arraybuffer.js b/test/parallel/test-buffer-backing-arraybuffer.js
index 75dcd60068..86fdf92181 100644
--- a/test/parallel/test-buffer-backing-arraybuffer.js
+++ b/test/parallel/test-buffer-backing-arraybuffer.js
@@ -20,7 +20,7 @@ for (const { length, expectOnHeap } of tests) {
new Float32Array(length / 4),
new Float64Array(length / 8),
Buffer.alloc(length),
- Buffer.allocUnsafeSlow(length)
+ Buffer.allocUnsafeSlow(length),
// Buffer.allocUnsafe() is missing because it may use pooled allocations.
];
diff --git a/test/parallel/test-buffer-bytelength.js b/test/parallel/test-buffer-bytelength.js
index 2355e4e0a0..33cbb32684 100644
--- a/test/parallel/test-buffer-bytelength.js
+++ b/test/parallel/test-buffer-bytelength.js
@@ -9,7 +9,7 @@ const vm = require('vm');
[32, 'latin1'],
[NaN, 'utf8'],
[{}, 'latin1'],
- []
+ [],
].forEach((args) => {
assert.throws(
() => Buffer.byteLength(...args),
diff --git a/test/parallel/test-buffer-failed-alloc-typed-arrays.js b/test/parallel/test-buffer-failed-alloc-typed-arrays.js
index 9e480a5c8d..3e91b31cca 100644
--- a/test/parallel/test-buffer-failed-alloc-typed-arrays.js
+++ b/test/parallel/test-buffer-failed-alloc-typed-arrays.js
@@ -18,7 +18,7 @@ const allocators = [
SlowBuffer,
Buffer.alloc,
Buffer.allocUnsafe,
- Buffer.allocUnsafeSlow
+ Buffer.allocUnsafeSlow,
];
for (const allocator of allocators) {
for (const size of sizes) {
diff --git a/test/parallel/test-buffer-fill.js b/test/parallel/test-buffer-fill.js
index 6e7b24989a..00e65c82e9 100644
--- a/test/parallel/test-buffer-fill.js
+++ b/test/parallel/test-buffer-fill.js
@@ -205,7 +205,7 @@ assert.throws(
[
['a', 0, 0, NaN],
- ['a', 0, 0, false]
+ ['a', 0, 0, false],
].forEach((args) => {
assert.throws(
() => buf1.fill(...args),
diff --git a/test/parallel/test-buffer-from.js b/test/parallel/test-buffer-from.js
index 165b38893f..b513f4080a 100644
--- a/test/parallel/test-buffer-from.js
+++ b/test/parallel/test-buffer-from.js
@@ -47,7 +47,7 @@ deepStrictEqual(
5n,
(one, two, three) => {},
undefined,
- null
+ null,
].forEach((input) => {
const errObj = {
code: 'ERR_INVALID_ARG_TYPE',
diff --git a/test/parallel/test-buffer-includes.js b/test/parallel/test-buffer-includes.js
index 5d74303fad..57b3a33aaa 100644
--- a/test/parallel/test-buffer-includes.js
+++ b/test/parallel/test-buffer-includes.js
@@ -275,7 +275,7 @@ for (let lengthIndex = 0; lengthIndex < lengths.length; lengthIndex++) {
[
() => { },
{},
- []
+ [],
].forEach((val) => {
assert.throws(
() => b.includes(val),
diff --git a/test/parallel/test-buffer-indexof.js b/test/parallel/test-buffer-indexof.js
index b17520366e..82d359ca21 100644
--- a/test/parallel/test-buffer-indexof.js
+++ b/test/parallel/test-buffer-indexof.js
@@ -350,7 +350,7 @@ assert.strictEqual(Buffer.from('aaaaa').indexOf('b', 'ucs2'), -1);
[
() => {},
{},
- []
+ [],
].forEach((val) => {
assert.throws(
() => b.indexOf(val),
diff --git a/test/parallel/test-buffer-isencoding.js b/test/parallel/test-buffer-isencoding.js
index 1a9e17dc48..f9150055cc 100644
--- a/test/parallel/test-buffer-isencoding.js
+++ b/test/parallel/test-buffer-isencoding.js
@@ -15,7 +15,7 @@ const assert = require('assert');
'ucs2',
'ucs-2',
'utf16le',
- 'utf-16le'
+ 'utf-16le',
].forEach((enc) => {
assert.strictEqual(Buffer.isEncoding(enc), true);
});
@@ -32,7 +32,7 @@ const assert = require('assert');
[],
1,
0,
- -1
+ -1,
].forEach((enc) => {
assert.strictEqual(Buffer.isEncoding(enc), false);
});
diff --git a/test/parallel/test-buffer-iterator.js b/test/parallel/test-buffer-iterator.js
index 0016b021c0..6cf64712c0 100644
--- a/test/parallel/test-buffer-iterator.js
+++ b/test/parallel/test-buffer-iterator.js
@@ -58,5 +58,5 @@ assert.deepStrictEqual(arr, [
[1, 2],
[2, 3],
[3, 4],
- [4, 5]
+ [4, 5],
]);
diff --git a/test/parallel/test-buffer-slice.js b/test/parallel/test-buffer-slice.js
index f40a495b20..05cbfba473 100644
--- a/test/parallel/test-buffer-slice.js
+++ b/test/parallel/test-buffer-slice.js
@@ -59,7 +59,7 @@ const expectedSameBufs = [
[buf.slice('-10', '-5'), Buffer.from('01234', 'utf8')],
[buf.slice('-10', '-0'), Buffer.from('', 'utf8')],
[buf.slice('111'), Buffer.from('', 'utf8')],
- [buf.slice('0', '-111'), Buffer.from('', 'utf8')]
+ [buf.slice('0', '-111'), Buffer.from('', 'utf8')],
];
for (let i = 0, s = buf.toString(); i < buf.length; ++i) {
@@ -114,13 +114,13 @@ assert.strictEqual(Buffer.from('hello', 'utf8').slice(0, 0).length, 0);
{
const buf = Buffer.from([
1, 29, 0, 0, 1, 143, 216, 162, 92, 254, 248, 63, 0,
- 0, 0, 18, 184, 6, 0, 175, 29, 0, 8, 11, 1, 0, 0
+ 0, 0, 18, 184, 6, 0, 175, 29, 0, 8, 11, 1, 0, 0,
]);
const chunk1 = Buffer.from([
- 1, 29, 0, 0, 1, 143, 216, 162, 92, 254, 248, 63, 0
+ 1, 29, 0, 0, 1, 143, 216, 162, 92, 254, 248, 63, 0,
]);
const chunk2 = Buffer.from([
- 0, 0, 18, 184, 6, 0, 175, 29, 0, 8, 11, 1, 0, 0
+ 0, 0, 18, 184, 6, 0, 175, 29, 0, 8, 11, 1, 0, 0,
]);
const middle = buf.length / 2;
diff --git a/test/parallel/test-buffer-write.js b/test/parallel/test-buffer-write.js
index 3a4a3a8b69..128327c47e 100644
--- a/test/parallel/test-buffer-write.js
+++ b/test/parallel/test-buffer-write.js
@@ -24,7 +24,7 @@ const resultMap = new Map([
['utf16le', Buffer.from([102, 0, 111, 0, 111, 0, 0, 0, 0])],
['base64', Buffer.from([102, 111, 111, 0, 0, 0, 0, 0, 0])],
['base64url', Buffer.from([102, 111, 111, 0, 0, 0, 0, 0, 0])],
- ['hex', Buffer.from([102, 111, 111, 0, 0, 0, 0, 0, 0])]
+ ['hex', Buffer.from([102, 111, 111, 0, 0, 0, 0, 0, 0])],
]);
// utf8, ucs2, ascii, latin1, utf16le
diff --git a/test/parallel/test-buffer-writedouble.js b/test/parallel/test-buffer-writedouble.js
index 3f156d8297..5026c81874 100644
--- a/test/parallel/test-buffer-writedouble.js
+++ b/test/parallel/test-buffer-writedouble.js
@@ -11,35 +11,35 @@ buffer.writeDoubleBE(2.225073858507201e-308, 0);
buffer.writeDoubleLE(2.225073858507201e-308, 8);
assert.ok(buffer.equals(new Uint8Array([
0x00, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00,
])));
buffer.writeDoubleBE(1.0000000000000004, 0);
buffer.writeDoubleLE(1.0000000000000004, 8);
assert.ok(buffer.equals(new Uint8Array([
0x3f, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
- 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x3f
+ 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x3f,
])));
buffer.writeDoubleBE(-2, 0);
buffer.writeDoubleLE(-2, 8);
assert.ok(buffer.equals(new Uint8Array([
0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0,
])));
buffer.writeDoubleBE(1.7976931348623157e+308, 0);
buffer.writeDoubleLE(1.7976931348623157e+308, 8);
assert.ok(buffer.equals(new Uint8Array([
0x7f, 0xef, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xef, 0x7f
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xef, 0x7f,
])));
buffer.writeDoubleBE(0 * -1, 0);
buffer.writeDoubleLE(0 * -1, 8);
assert.ok(buffer.equals(new Uint8Array([
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80,
])));
buffer.writeDoubleBE(Infinity, 0);
@@ -47,7 +47,7 @@ buffer.writeDoubleLE(Infinity, 8);
assert.ok(buffer.equals(new Uint8Array([
0x7F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x7F
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x7F,
])));
assert.strictEqual(buffer.readDoubleBE(0), Infinity);
@@ -58,7 +58,7 @@ buffer.writeDoubleLE(-Infinity, 8);
assert.ok(buffer.equals(new Uint8Array([
0xFF, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0xFF
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0xFF,
])));
assert.strictEqual(buffer.readDoubleBE(0), -Infinity);
@@ -72,12 +72,12 @@ buffer.writeDoubleLE(NaN, 8);
if (buffer[1] === 0xF7) {
assert.ok(buffer.equals(new Uint8Array([
0x7F, 0xF7, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
- 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x7F
+ 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x7F,
])));
} else {
assert.ok(buffer.equals(new Uint8Array([
0x7F, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0x7F
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0x7F,
])));
}
diff --git a/test/parallel/test-buffer-writeint.js b/test/parallel/test-buffer-writeint.js
index 4799fb33d7..e4b916b1cf 100644
--- a/test/parallel/test-buffer-writeint.js
+++ b/test/parallel/test-buffer-writeint.js
@@ -107,32 +107,32 @@ const errorOutOfBounds = {
buffer.writeInt32BE(0x23, 0);
buffer.writeInt32LE(0x23, 4);
assert.ok(buffer.equals(new Uint8Array([
- 0x00, 0x00, 0x00, 0x23, 0x23, 0x00, 0x00, 0x00
+ 0x00, 0x00, 0x00, 0x23, 0x23, 0x00, 0x00, 0x00,
])));
buffer.writeInt32BE(-5, 0);
buffer.writeInt32LE(-5, 4);
assert.ok(buffer.equals(new Uint8Array([
- 0xff, 0xff, 0xff, 0xfb, 0xfb, 0xff, 0xff, 0xff
+ 0xff, 0xff, 0xff, 0xfb, 0xfb, 0xff, 0xff, 0xff,
])));
buffer.writeInt32BE(-805306713, 0);
buffer.writeInt32LE(-805306713, 4);
assert.ok(buffer.equals(new Uint8Array([
- 0xcf, 0xff, 0xfe, 0xa7, 0xa7, 0xfe, 0xff, 0xcf
+ 0xcf, 0xff, 0xfe, 0xa7, 0xa7, 0xfe, 0xff, 0xcf,
])));
/* Make sure we handle min/max correctly */
buffer.writeInt32BE(0x7fffffff, 0);
buffer.writeInt32BE(-0x80000000, 4);
assert.ok(buffer.equals(new Uint8Array([
- 0x7f, 0xff, 0xff, 0xff, 0x80, 0x00, 0x00, 0x00
+ 0x7f, 0xff, 0xff, 0xff, 0x80, 0x00, 0x00, 0x00,
])));
buffer.writeInt32LE(0x7fffffff, 0);
buffer.writeInt32LE(-0x80000000, 4);
assert.ok(buffer.equals(new Uint8Array([
- 0xff, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x80
+ 0xff, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x80,
])));
['writeInt32BE', 'writeInt32LE'].forEach((fn) => {
@@ -168,12 +168,12 @@ const errorOutOfBounds = {
const buffer = Buffer.allocUnsafe(6);
buffer.writeIntBE(value, 0, 6);
assert.ok(buffer.equals(new Uint8Array([
- 0x12, 0x34, 0x56, 0x78, 0x90, 0xab
+ 0x12, 0x34, 0x56, 0x78, 0x90, 0xab,
])));
buffer.writeIntLE(value, 0, 6);
assert.ok(buffer.equals(new Uint8Array([
- 0xab, 0x90, 0x78, 0x56, 0x34, 0x12
+ 0xab, 0x90, 0x78, 0x56, 0x34, 0x12,
])));
}
diff --git a/test/parallel/test-buffer-zero-fill-cli.js b/test/parallel/test-buffer-zero-fill-cli.js
index 2f3b243c47..4299f81039 100644
--- a/test/parallel/test-buffer-zero-fill-cli.js
+++ b/test/parallel/test-buffer-zero-fill-cli.js
@@ -24,7 +24,7 @@ for (let i = 0; i < 50; i++) {
Buffer.allocUnsafe(20),
SlowBuffer(20),
Buffer(20),
- new SlowBuffer(20)
+ new SlowBuffer(20),
];
for (const buf of bufs) {
assert(isZeroFilled(buf));
diff --git a/test/parallel/test-child-process-can-write-to-stdout.js b/test/parallel/test-child-process-can-write-to-stdout.js
index bb9ddb71c8..069e07fb16 100644
--- a/test/parallel/test-child-process-can-write-to-stdout.js
+++ b/test/parallel/test-child-process-can-write-to-stdout.js
@@ -8,7 +8,7 @@ const assert = require('assert');
const spawn = require('child_process').spawn;
const child = spawn(process.argv[0], [
- fixtures.path('GH-1899-output.js')
+ fixtures.path('GH-1899-output.js'),
]);
let output = '';
diff --git a/test/parallel/test-child-process-exec-timeout.js b/test/parallel/test-child-process-exec-timeout.js
index ba64dad101..64648d62bb 100644
--- a/test/parallel/test-child-process-exec-timeout.js
+++ b/test/parallel/test-child-process-exec-timeout.js
@@ -67,7 +67,7 @@ if (common.isWindows) {
'where',
`commandline like '%${basename}%child'`,
'delete',
- '/nointeractive'
+ '/nointeractive',
]);
});
}
diff --git a/test/parallel/test-child-process-execfilesync-maxbuf.js b/test/parallel/test-child-process-execfilesync-maxbuf.js
index 9af7c0ed8d..63f8cc26eb 100644
--- a/test/parallel/test-child-process-execfilesync-maxbuf.js
+++ b/test/parallel/test-child-process-execfilesync-maxbuf.js
@@ -12,7 +12,7 @@ const msgOutBuf = Buffer.from(`${msgOut}\n`);
const args = [
'-e',
- `console.log("${msgOut}");`
+ `console.log("${msgOut}");`,
];
// Verify that an error is returned if maxBuffer is surpassed.
diff --git a/test/parallel/test-child-process-execsync-maxbuf.js b/test/parallel/test-child-process-execsync-maxbuf.js
index 0aafd1a74b..62b211cc3a 100644
--- a/test/parallel/test-child-process-execsync-maxbuf.js
+++ b/test/parallel/test-child-process-execsync-maxbuf.js
@@ -12,7 +12,7 @@ const msgOutBuf = Buffer.from(`${msgOut}\n`);
const args = [
'-e',
- `"console.log('${msgOut}')";`
+ `"console.log('${msgOut}')";`,
];
// Verify that an error is returned if maxBuffer is surpassed.
diff --git a/test/parallel/test-child-process-fork-args.js b/test/parallel/test-child-process-fork-args.js
index 02a8db5fa6..68863ffb14 100644
--- a/test/parallel/test-child-process-fork-args.js
+++ b/test/parallel/test-child-process-fork-args.js
@@ -19,7 +19,7 @@ const expectedEnv = { foo: 'bar' };
[],
{},
() => {},
- Symbol('t')
+ Symbol('t'),
];
invalidModulePath.forEach((modulePath) => {
assert.throws(() => fork(modulePath), {
@@ -46,7 +46,7 @@ const expectedEnv = { foo: 'bar' };
0,
true,
() => {},
- Symbol('t')
+ Symbol('t'),
];
invalidSecondArgs.forEach((arg) => {
assert.throws(
@@ -89,7 +89,7 @@ const expectedEnv = { foo: 'bar' };
0,
true,
() => {},
- Symbol('t')
+ Symbol('t'),
];
invalidThirdArgs.forEach((arg) => {
assert.throws(
diff --git a/test/parallel/test-child-process-recv-handle.js b/test/parallel/test-child-process-recv-handle.js
index d6bfa0d425..b67bc206ac 100644
--- a/test/parallel/test-child-process-recv-handle.js
+++ b/test/parallel/test-child-process-recv-handle.js
@@ -37,7 +37,7 @@ function primary() {
// spawn() can only create one IPC channel so we use stdin/stdout as an
// ad-hoc command channel.
const proc = spawn(process.execPath, [
- '--expose-internals', __filename, 'worker'
+ '--expose-internals', __filename, 'worker',
], {
stdio: ['pipe', 'pipe', 'pipe', 'ipc']
});
diff --git a/test/parallel/test-child-process-spawnsync-input.js b/test/parallel/test-child-process-spawnsync-input.js
index 4dce110316..62ae476ae1 100644
--- a/test/parallel/test-child-process-spawnsync-input.js
+++ b/test/parallel/test-child-process-spawnsync-input.js
@@ -35,7 +35,7 @@ const msgErrBuf = Buffer.from(`${msgErr}\n`);
const args = [
'-e',
- `console.log("${msgOut}"); console.error("${msgErr}");`
+ `console.log("${msgOut}"); console.error("${msgErr}");`,
];
let ret;
diff --git a/test/parallel/test-child-process-spawnsync-maxbuf.js b/test/parallel/test-child-process-spawnsync-maxbuf.js
index 8d685350ad..3f452a41e6 100644
--- a/test/parallel/test-child-process-spawnsync-maxbuf.js
+++ b/test/parallel/test-child-process-spawnsync-maxbuf.js
@@ -12,7 +12,7 @@ const msgOutBuf = Buffer.from(`${msgOut}\n`);
const args = [
'-e',
- `console.log("${msgOut}");`
+ `console.log("${msgOut}");`,
];
// Verify that an error is returned if maxBuffer is surpassed.
diff --git a/test/parallel/test-child-process-spawnsync.js b/test/parallel/test-child-process-spawnsync.js
index c464dbefa6..9ec125ea89 100644
--- a/test/parallel/test-child-process-spawnsync.js
+++ b/test/parallel/test-child-process-spawnsync.js
@@ -61,7 +61,7 @@ assert.deepStrictEqual(ret_err.spawnargs, ['bar']);
const stringifiedDefault = [
null,
retDefault.stdout.toString(),
- retDefault.stderr.toString()
+ retDefault.stderr.toString(),
];
assert.deepStrictEqual(retUTF8.output, stringifiedDefault);
}
diff --git a/test/parallel/test-child-process-validate-stdio.js b/test/parallel/test-child-process-validate-stdio.js
index 7aa79b88c4..6775455fd6 100644
--- a/test/parallel/test-child-process-validate-stdio.js
+++ b/test/parallel/test-child-process-validate-stdio.js
@@ -50,7 +50,7 @@ if (common.isMainThread) {
stdio: [
{ type: 'fd', fd: 0 },
{ type: 'fd', fd: 1 },
- { type: 'fd', fd: 2 }
+ { type: 'fd', fd: 2 },
],
ipc: undefined,
ipcFd: undefined
diff --git a/test/parallel/test-cli-options-precedence.js b/test/parallel/test-cli-options-precedence.js
index f76c12043e..32804d187f 100644
--- a/test/parallel/test-cli-options-precedence.js
+++ b/test/parallel/test-cli-options-precedence.js
@@ -7,7 +7,7 @@ const { spawnSync } = require('child_process');
assert.strictEqual(spawnSync(process.execPath, [
'--max-http-header-size=1234',
'--max-http-header-size=5678',
- '-p', 'http.maxHeaderSize'
+ '-p', 'http.maxHeaderSize',
], {
encoding: 'utf8'
}).stdout.trim(), '5678');
@@ -15,7 +15,7 @@ assert.strictEqual(spawnSync(process.execPath, [
// The command line takes precedence over NODE_OPTIONS:
assert.strictEqual(spawnSync(process.execPath, [
'--max-http-header-size=5678',
- '-p', 'http.maxHeaderSize'
+ '-p', 'http.maxHeaderSize',
], {
encoding: 'utf8',
env: { ...process.env, NODE_OPTIONS: '--max-http-header-size=1234' }
diff --git a/test/parallel/test-cli-syntax-piped-bad.js b/test/parallel/test-cli-syntax-piped-bad.js
index abd924848f..d22c21cb7e 100644
--- a/test/parallel/test-cli-syntax-piped-bad.js
+++ b/test/parallel/test-cli-syntax-piped-bad.js
@@ -9,7 +9,7 @@ const node = process.execPath;
// Test both sets of arguments that check syntax
const syntaxArgs = [
'-c',
- '--check'
+ '--check',
];
// Match on the name of the `Error` but not the message as it is different
diff --git a/test/parallel/test-cli-syntax-piped-good.js b/test/parallel/test-cli-syntax-piped-good.js
index 43de5d32f4..db2e0f875d 100644
--- a/test/parallel/test-cli-syntax-piped-good.js
+++ b/test/parallel/test-cli-syntax-piped-good.js
@@ -9,7 +9,7 @@ const node = process.execPath;
// Test both sets of arguments that check syntax
const syntaxArgs = [
'-c',
- '--check'
+ '--check',
];
// Should not execute code piped from stdin with --check.
diff --git a/test/parallel/test-cluster-worker-exit.js b/test/parallel/test-cluster-worker-exit.js
index 8867696b9a..09e2a83701 100644
--- a/test/parallel/test-cluster-worker-exit.js
+++ b/test/parallel/test-cluster-worker-exit.js
@@ -53,7 +53,7 @@ if (cluster.isWorker) {
worker_emitExit: [1, "the worker did not emit 'exit'"],
worker_state: ['disconnected', 'the worker state is incorrect'],
worker_exitedAfterDisconnect: [
- false, 'the .exitedAfterDisconnect flag is incorrect'
+ false, 'the .exitedAfterDisconnect flag is incorrect',
],
worker_died: [true, 'the worker is still running'],
worker_exitCode: [EXIT_CODE, 'the worker exited w/ incorrect exitCode'],
diff --git a/test/parallel/test-common-countdown.js b/test/parallel/test-common-countdown.js
index 6a1a2f1bbc..d3c0daf599 100644
--- a/test/parallel/test-common-countdown.js
+++ b/test/parallel/test-common-countdown.js
@@ -19,7 +19,7 @@ const failFixtures = [
[
fixtures.path('failcounter.js'),
'Mismatched <anonymous> function calls. Expected exactly 1, actual 0.',
- ]
+ ],
];
for (const p of failFixtures) {
diff --git a/test/parallel/test-common.js b/test/parallel/test-common.js
index 3087cc035e..24c4f8462e 100644
--- a/test/parallel/test-common.js
+++ b/test/parallel/test-common.js
@@ -91,11 +91,11 @@ fnAtLeast2Called3();
const failFixtures = [
[
fixtures.path('failmustcall1.js'),
- 'Mismatched <anonymous> function calls. Expected exactly 2, actual 1.'
+ 'Mismatched <anonymous> function calls. Expected exactly 2, actual 1.',
], [
fixtures.path('failmustcall2.js'),
- 'Mismatched <anonymous> function calls. Expected at least 2, actual 1.'
- ]
+ 'Mismatched <anonymous> function calls. Expected at least 2, actual 1.',
+ ],
];
for (const p of failFixtures) {
const [file, expected] = p;
diff --git a/test/parallel/test-console-tty-colors.js b/test/parallel/test-console-tty-colors.js
index e906c71c18..0eb51c7289 100644
--- a/test/parallel/test-console-tty-colors.js
+++ b/test/parallel/test-console-tty-colors.js
@@ -10,7 +10,7 @@ function check(isTTY, colorMode, expectedColorMode, inspectOptions) {
1,
{ a: 2 },
[ 'foo' ],
- { '\\a': '\\bar' }
+ { '\\a': '\\bar' },
];
let i = 0;
diff --git a/test/parallel/test-console.js b/test/parallel/test-console.js
index e5e80ee61b..ee2c7c82a6 100644
--- a/test/parallel/test-console.js
+++ b/test/parallel/test-console.js
@@ -49,7 +49,7 @@ common.expectWarning(
['No such label \'default\' for console.timeLog()'],
['No such label \'default\' for console.timeEnd()'],
['Label \'default\' already exists for console.time()'],
- ['Label \'test\' already exists for console.time()']
+ ['Label \'test\' already exists for console.time()'],
]
);
@@ -216,7 +216,7 @@ console.timeEnd('label3');
assert.strictEqual(console._times.size, timesMapSize);
const expectedStrings = [
- 'foo', 'foo bar', 'foo bar hop', "{ slashes: '\\\\\\\\' }", 'inspect'
+ 'foo', 'foo bar', 'foo bar hop', "{ slashes: '\\\\\\\\' }", 'inspect',
];
for (const expected of expectedStrings) {
diff --git a/test/parallel/test-crypto-authenticated.js b/test/parallel/test-crypto-authenticated.js
index da63813531..d6b09b0377 100644
--- a/test/parallel/test-crypto-authenticated.js
+++ b/test/parallel/test-crypto-authenticated.js
@@ -69,12 +69,12 @@ const expectedWarnings = common.hasFipsCrypto ?
['Use Cipheriv for counter mode of aes-256-ccm'],
['Use Cipheriv for counter mode of aes-256-ccm'],
['Use Cipheriv for counter mode of aes-256-ccm'],
- ['Use Cipheriv for counter mode of aes-256-ccm']
+ ['Use Cipheriv for counter mode of aes-256-ccm'],
];
const expectedDeprecationWarnings = [
['crypto.DEFAULT_ENCODING is deprecated.', 'DEP0091'],
- ['crypto.createCipher is deprecated.', 'DEP0106']
+ ['crypto.createCipher is deprecated.', 'DEP0106'],
];
common.expectWarning({
@@ -311,7 +311,7 @@ for (const test of TEST_CASES) {
decipher.setAuthTag(Buffer.from('445352d3ff85cf94', 'hex'));
const text = Buffer.concat([
decipher.update('3a2a3647', 'hex'),
- decipher.final()
+ decipher.final(),
]);
assert.strictEqual(text.toString('utf8'), 'node');
}
@@ -612,7 +612,7 @@ for (const test of TEST_CASES) {
// Decryption should still work.
const plaintext = Buffer.concat([
decipher.update(ciphertext),
- decipher.final()
+ decipher.final(),
]);
assert(plain.equals(plaintext));
}
diff --git a/test/parallel/test-crypto-binary-default.js b/test/parallel/test-crypto-binary-default.js
index ada50d6b9c..3bbca5b0da 100644
--- a/test/parallel/test-crypto-binary-default.js
+++ b/test/parallel/test-crypto-binary-default.js
@@ -214,7 +214,7 @@ assert.throws(function() {
'20cdc944b6022cac3c4982b10d5eeb55c3e4de15134676fb6de04460' +
'65c97440fa8c6a58'
}
- }
+ },
];
for (const testCase of rfc4231) {
@@ -286,7 +286,7 @@ assert.throws(function() {
'Test Using Larger Than Block-Size Key and Larger Than One ' +
'Block-Size Data',
hmac: '6f630fad67cda0ee1fb1f562db3aa53e'
- }
+ },
];
const rfc2202_sha1 = [
{
@@ -340,7 +340,7 @@ assert.throws(function() {
'Test Using Larger Than Block-Size Key and Larger Than One ' +
'Block-Size Data',
hmac: 'e8e99d0f45237d786d6bbaa7965c7808bbff1a91'
- }
+ },
];
if (!common.hasFipsCrypto) {
diff --git a/test/parallel/test-crypto-cipher-decipher.js b/test/parallel/test-crypto-cipher-decipher.js
index 603d90ff67..35514afbea 100644
--- a/test/parallel/test-crypto-cipher-decipher.js
+++ b/test/parallel/test-crypto-cipher-decipher.js
@@ -12,10 +12,10 @@ const assert = require('assert');
common.expectWarning({
Warning: [
- ['Use Cipheriv for counter mode of aes-256-gcm']
+ ['Use Cipheriv for counter mode of aes-256-gcm'],
],
DeprecationWarning: [
- ['crypto.createCipher is deprecated.', 'DEP0106']
+ ['crypto.createCipher is deprecated.', 'DEP0106'],
]
});
diff --git a/test/parallel/test-crypto-dh.js b/test/parallel/test-crypto-dh.js
index 92687b448c..25a1d0f765 100644
--- a/test/parallel/test-crypto-dh.js
+++ b/test/parallel/test-crypto-dh.js
@@ -111,7 +111,7 @@ for (const g of [Buffer.from([]),
[0x1, 0x2],
() => { },
/abc/,
- {}
+ {},
].forEach((input) => {
assert.throws(
() => crypto.createDiffieHellman(input),
@@ -217,7 +217,7 @@ const modp2buf = Buffer.from([
0x5c, 0xb6, 0xf4, 0x06, 0xb7, 0xed, 0xee, 0x38, 0x6b, 0xfb,
0x5a, 0x89, 0x9f, 0xa5, 0xae, 0x9f, 0x24, 0x11, 0x7c, 0x4b,
0x1f, 0xe6, 0x49, 0x28, 0x66, 0x51, 0xec, 0xe6, 0x53, 0x81,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
]);
{
diff --git a/test/parallel/test-crypto-hmac.js b/test/parallel/test-crypto-hmac.js
index 2f60d8124f..cfaa041c06 100644
--- a/test/parallel/test-crypto-hmac.js
+++ b/test/parallel/test-crypto-hmac.js
@@ -49,7 +49,7 @@ function testHmac(algo, key, data, expected) {
// If the key is a Buffer, test Hmac with a key object as well.
const keyWrappers = [
(key) => key,
- ...(typeof key === 'string' ? [] : [crypto.createSecretKey])
+ ...(typeof key === 'string' ? [] : [crypto.createSecretKey]),
];
for (const keyWrapper of keyWrappers) {
@@ -260,7 +260,7 @@ const rfc4231 = [
'20cdc944b6022cac3c4982b10d5eeb55c3e4de15134676fb6de04460' +
'65c97440fa8c6a58'
}
- }
+ },
];
for (let i = 0, l = rfc4231.length; i < l; i++) {
@@ -342,7 +342,7 @@ const rfc2202_md5 = [
'Test Using Larger Than Block-Size Key and Larger Than One ' +
'Block-Size Data',
hmac: '6f630fad67cda0ee1fb1f562db3aa53e'
- }
+ },
];
for (const { key, data, hmac } of rfc2202_md5)
@@ -400,7 +400,7 @@ const rfc2202_sha1 = [
'Test Using Larger Than Block-Size Key and Larger Than One ' +
'Block-Size Data',
hmac: 'e8e99d0f45237d786d6bbaa7965c7808bbff1a91'
- }
+ },
];
for (const { key, data, hmac } of rfc2202_sha1)
diff --git a/test/parallel/test-crypto-key-objects.js b/test/parallel/test-crypto-key-objects.js
index 871d5da66c..d7b3f9af83 100644
--- a/test/parallel/test-crypto-key-objects.js
+++ b/test/parallel/test-crypto-key-objects.js
@@ -81,12 +81,12 @@ const privateDsa = fixtures.readKey('dsa_private_encrypted_1025.pem',
const cipher = createCipheriv('aes-256-ecb', key, null);
const ciphertext = Buffer.concat([
- cipher.update(plaintext), cipher.final()
+ cipher.update(plaintext), cipher.final(),
]);
const decipher = createDecipheriv('aes-256-ecb', key, null);
const deciphered = Buffer.concat([
- decipher.update(ciphertext), decipher.final()
+ decipher.update(ciphertext), decipher.final(),
]);
assert(plaintext.equals(deciphered));
@@ -263,16 +263,16 @@ const privateDsa = fixtures.readKey('dsa_private_encrypted_1025.pem',
// Test distinguishing PKCS#1 public and private keys based on the
// DER-encoded data only.
publicEncrypt({ format: 'der', type: 'pkcs1', key: publicDER }, plaintext),
- publicEncrypt({ format: 'der', type: 'pkcs1', key: privateDER }, plaintext)
+ publicEncrypt({ format: 'der', type: 'pkcs1', key: privateDER }, plaintext),
], [
privateKey,
{ format: 'pem', key: privatePem },
{ format: 'der', type: 'pkcs1', key: privateDER },
- { key: jwk, format: 'jwk' }
+ { key: jwk, format: 'jwk' },
]);
testDecryption(publicDecrypt, [
- privateEncrypt(privateKey, plaintext)
+ privateEncrypt(privateKey, plaintext),
], [
// Decrypt using the public key.
publicKey,
@@ -284,7 +284,7 @@ const privateDsa = fixtures.readKey('dsa_private_encrypted_1025.pem',
privateKey,
{ format: 'pem', key: privatePem },
{ format: 'der', type: 'pkcs1', key: privateDER },
- { key: jwk, format: 'jwk' }
+ { key: jwk, format: 'jwk' },
]);
}
diff --git a/test/parallel/test-crypto-keygen.js b/test/parallel/test-crypto-keygen.js
index e5c8a107ba..55f878971b 100644
--- a/test/parallel/test-crypto-keygen.js
+++ b/test/parallel/test-crypto-keygen.js
@@ -1091,7 +1091,7 @@ const sec1EncExp = (cipher) => getRegExpForPEM('EC PRIVATE KEY', cipher);
['group', 'prime'],
['group', 'primeLength'],
['group', 'generator'],
- ['prime', 'primeLength']
+ ['prime', 'primeLength'],
];
for (const [opt1, opt2] of incompatible) {
assert.throws(() => {
diff --git a/test/parallel/test-crypto-random.js b/test/parallel/test-crypto-random.js
index 9472f8ef07..4f0c7dbb43 100644
--- a/test/parallel/test-crypto-random.js
+++ b/test/parallel/test-crypto-random.js
@@ -93,7 +93,7 @@ common.expectWarning('DeprecationWarning',
new Uint32Array(10),
new Float32Array(10),
new Float64Array(10),
- new DataView(new ArrayBuffer(10))
+ new DataView(new ArrayBuffer(10)),
].forEach((buf) => {
const before = Buffer.from(buf.buffer).toString('hex');
crypto.randomFillSync(buf);
@@ -117,7 +117,7 @@ common.expectWarning('DeprecationWarning',
{
[
new ArrayBuffer(10),
- new SharedArrayBuffer(10)
+ new SharedArrayBuffer(10),
].forEach((buf) => {
const before = Buffer.from(buf).toString('hex');
crypto.randomFillSync(buf);
@@ -150,7 +150,7 @@ common.expectWarning('DeprecationWarning',
new Uint32Array(10),
new Float32Array(10),
new Float64Array(10),
- new DataView(new ArrayBuffer(10))
+ new DataView(new ArrayBuffer(10)),
].forEach((buf) => {
const before = Buffer.from(buf.buffer).toString('hex');
crypto.randomFill(buf, common.mustSucceed((buf) => {
@@ -163,7 +163,7 @@ common.expectWarning('DeprecationWarning',
{
[
new ArrayBuffer(10),
- new SharedArrayBuffer(10)
+ new SharedArrayBuffer(10),
].forEach((buf) => {
const before = Buffer.from(buf).toString('hex');
crypto.randomFill(buf, common.mustSucceed((buf) => {
@@ -223,7 +223,7 @@ common.expectWarning('DeprecationWarning',
{
[
Buffer.alloc(10),
- new Uint8Array(new Array(10).fill(0))
+ new Uint8Array(new Array(10).fill(0)),
].forEach((buf) => {
const len = Buffer.byteLength(buf);
assert.strictEqual(len, 10, `Expected byteLength of 10, got ${len}`);
diff --git a/test/parallel/test-crypto-randomuuid.js b/test/parallel/test-crypto-randomuuid.js
index 232dcec62c..23e97fb8cf 100644
--- a/test/parallel/test-crypto-randomuuid.js
+++ b/test/parallel/test-crypto-randomuuid.js
@@ -11,7 +11,7 @@ const {
} = require('crypto');
const last = new Set([
- '00000000-0000-0000-0000-000000000000'
+ '00000000-0000-0000-0000-000000000000',
]);
function testMatch(uuid) {
diff --git a/test/parallel/test-crypto-scrypt.js b/test/parallel/test-crypto-scrypt.js
index aec86d6489..9db69646bb 100644
--- a/test/parallel/test-crypto-scrypt.js
+++ b/test/parallel/test-crypto-scrypt.js
@@ -99,7 +99,7 @@ const bad = [
{ N: 3, p: 1, r: 1 }, // Not power of 2.
{ N: 1, cost: 1 }, // Both N and cost
{ p: 1, parallelization: 1 }, // Both p and parallelization
- { r: 1, blockSize: 1 } // Both r and blocksize
+ { r: 1, blockSize: 1 }, // Both r and blocksize
];
// Test vectors where 128*N*r exceeds maxmem.
@@ -259,6 +259,6 @@ for (const { args, expected } of badargs) {
[
['N', 16384], ['cost', 16384],
['r', 8], ['blockSize', 8],
- ['p', 1], ['parallelization', 1]
+ ['p', 1], ['parallelization', 1],
].forEach((arg) => testParameter(...arg));
}
diff --git a/test/parallel/test-crypto-sign-verify.js b/test/parallel/test-crypto-sign-verify.js
index dc90e5b311..55d3de27ad 100644
--- a/test/parallel/test-crypto-sign-verify.js
+++ b/test/parallel/test-crypto-sign-verify.js
@@ -174,14 +174,14 @@ assert.throws(
getEffectiveSaltLength(crypto.constants.RSA_PSS_SALTLEN_DIGEST),
crypto.constants.RSA_PSS_SALTLEN_MAX_SIGN,
getEffectiveSaltLength(crypto.constants.RSA_PSS_SALTLEN_MAX_SIGN),
- 0, 16, 32, 64, 128
+ 0, 16, 32, 64, 128,
];
const verifySaltLengths = [
crypto.constants.RSA_PSS_SALTLEN_DIGEST,
getEffectiveSaltLength(crypto.constants.RSA_PSS_SALTLEN_DIGEST),
getEffectiveSaltLength(crypto.constants.RSA_PSS_SALTLEN_MAX_SIGN),
- 0, 16, 32, 64, 128
+ 0, 16, 32, 64, 128,
];
const errMessage = /^Error:.*data too large for key size$/;
@@ -390,7 +390,7 @@ assert.throws(
});
[
- Uint8Array, Uint16Array, Uint32Array, Float32Array, Float64Array
+ Uint8Array, Uint16Array, Uint32Array, Float32Array, Float64Array,
].forEach((clazz) => {
// These should all just work
sign.update(new clazz());
@@ -429,7 +429,7 @@ assert.throws(
{ private: fixtures.readKey('rsa_private_2048.pem', 'ascii'),
public: fixtures.readKey('rsa_public_2048.pem', 'ascii'),
algo: 'sha1',
- sigLen: 256 }
+ sigLen: 256 },
].forEach((pair) => {
const algo = pair.algo;
@@ -465,7 +465,7 @@ assert.throws(
}
[
- Uint8Array, Uint16Array, Uint32Array, Float32Array, Float64Array
+ Uint8Array, Uint16Array, Uint32Array, Float32Array, Float64Array,
].forEach((clazz) => {
const data = new clazz();
const sig = crypto.sign(algo, data, pair.private);
@@ -503,7 +503,7 @@ assert.throws(
[
crypto.createSign('sha1').update(data).sign(privKey),
crypto.sign('sha1', data, privKey),
- crypto.sign('sha1', data, { key: privKey, dsaEncoding: 'der' })
+ crypto.sign('sha1', data, { key: privKey, dsaEncoding: 'der' }),
].forEach((sig) => {
// Signature length variability due to DER encoding
assert(sig.length >= length + 4 && sig.length <= length + 8);
diff --git a/test/parallel/test-crypto-x509.js b/test/parallel/test-crypto-x509.js
index 0915cb61fd..c85a79b485 100644
--- a/test/parallel/test-crypto-x509.js
+++ b/test/parallel/test-crypto-x509.js
@@ -149,7 +149,7 @@ const der = Buffer.from(
'wildcards',
'partialWildcards',
'multiLabelWildcards',
- 'singleLabelSubdomains'
+ 'singleLabelSubdomains',
].forEach((key) => {
[1, '', null, {}].forEach((i) => {
assert.throws(() => x509.checkHost('agent1', { [key]: i }), {
diff --git a/test/parallel/test-crypto.js b/test/parallel/test-crypto.js
index 623320fb19..58441be4d0 100644
--- a/test/parallel/test-crypto.js
+++ b/test/parallel/test-crypto.js
@@ -27,7 +27,7 @@ if (!common.hasCrypto)
common.expectWarning({
DeprecationWarning: [
- ['crypto.createCipher is deprecated.', 'DEP0106']
+ ['crypto.createCipher is deprecated.', 'DEP0106'],
]
});
@@ -212,7 +212,7 @@ assert.throws(() => {
'eKN7LggbF3Dk5wIQN6SL+fQ5H/+7NgARsVBp0QIRANxYRukavs4QvuyNhMx+vrkCEQCbf6j/',
'Ig6/HueCK/0Jkmp+',
'-----END RSA PRIVATE KEY-----',
- ''
+ '',
].join('\n');
crypto.createSign('SHA256').update('test').sign(priv);
}, (err) => {
diff --git a/test/parallel/test-dgram-createSocket-type.js b/test/parallel/test-dgram-createSocket-type.js
index ae141d3c38..19bbd6c1b2 100644
--- a/test/parallel/test-dgram-createSocket-type.js
+++ b/test/parallel/test-dgram-createSocket-type.js
@@ -11,13 +11,13 @@ const invalidTypes = [
true,
false,
null,
- undefined
+ undefined,
];
const validTypes = [
'udp4',
'udp6',
{ type: 'udp4' },
- { type: 'udp6' }
+ { type: 'udp6' },
];
const errMessage = /^Bad socket type specified\. Valid types are: udp4, udp6$/;
diff --git a/test/parallel/test-dgram-deprecation-error.js b/test/parallel/test-dgram-deprecation-error.js
index 37664a5720..c544a917b0 100644
--- a/test/parallel/test-dgram-deprecation-error.js
+++ b/test/parallel/test-dgram-deprecation-error.js
@@ -14,12 +14,12 @@ const propertiesToTest = [
'_receiving',
'_bindState',
'_queue',
- '_reuseAddr'
+ '_reuseAddr',
];
const methodsToTest = [
'_healthCheck',
- '_stopReceiving'
+ '_stopReceiving',
];
const propertyCases = propertiesToTest.map((propName) => {
@@ -41,7 +41,7 @@ const propertyCases = propertiesToTest.map((propName) => {
'DEP0112'
);
sock[propName] = null;
- }
+ },
];
});
diff --git a/test/parallel/test-dns-lookup-promises.js b/test/parallel/test-dns-lookup-promises.js
index 9dab377f6a..31c7dbd245 100644
--- a/test/parallel/test-dns-lookup-promises.js
+++ b/test/parallel/test-dns-lookup-promises.js
@@ -56,7 +56,7 @@ async function lookupPositive() {
stub: getaddrinfoPositive(['some-address2']),
factory: () => dnsPromises.lookup('example.com', { family: 6 }),
expectation: { address: 'some-address2', family: 6 }
- }
+ },
].forEach(async ({ stub, factory, expectation }) => {
getaddrinfoStub = stub;
assert.deepStrictEqual(await factory(), expectation);
@@ -80,7 +80,7 @@ async function lookupallPositive() {
factory: () => dnsPromises.lookup('example', { all: true }),
expectation: [
{ address: '::1', family: 6 },
- { address: '::2', family: 6 }
+ { address: '::2', family: 6 },
]
},
{
@@ -88,7 +88,7 @@ async function lookupallPositive() {
factory: () => dnsPromises.lookup('example', { all: true, family: 4 }),
expectation: [
{ address: '::1', family: 4 },
- { address: '::2', family: 4 }
+ { address: '::2', family: 4 },
]
},
{
@@ -96,7 +96,7 @@ async function lookupallPositive() {
factory: () => dnsPromises.lookup('example', { all: true }),
expectation: [
{ address: '127.0.0.1', family: 4 },
- { address: 'some-address', family: 0 }
+ { address: 'some-address', family: 0 },
]
},
{
@@ -104,14 +104,14 @@ async function lookupallPositive() {
factory: () => dnsPromises.lookup('example', { all: true, family: 6 }),
expectation: [
{ address: '127.0.0.1', family: 6 },
- { address: 'some-address', family: 6 }
+ { address: 'some-address', family: 6 },
]
},
{
stub: getaddrinfoPositive([]),
factory: () => dnsPromises.lookup('example', { all: true }),
expectation: []
- }
+ },
].forEach(async ({ stub, factory, expectation }) => {
getaddrinfoStub = stub;
assert.deepStrictEqual(await factory(), expectation);
@@ -134,6 +134,6 @@ async function lookupallNegative() {
lookupPositive(),
lookupNegative(),
lookupallPositive(),
- lookupallNegative()
+ lookupallNegative(),
]);
})().then(common.mustCall());
diff --git a/test/parallel/test-dns-lookup.js b/test/parallel/test-dns-lookup.js
index 606c1c10e6..14dfec61ee 100644
--- a/test/parallel/test-dns-lookup.js
+++ b/test/parallel/test-dns-lookup.js
@@ -27,7 +27,7 @@ const dnsPromises = dns.promises;
common.expectWarning({
// For 'internal/test/binding' module.
'internal/test/binding': [
- 'These APIs are for internal testing only. Do not use them.'
+ 'These APIs are for internal testing only. Do not use them.',
],
// For calling `dns.lookup` with falsy `hostname`.
'DeprecationWarning': {
diff --git a/test/parallel/test-dns-multi-channel.js b/test/parallel/test-dns-multi-channel.js
index 890c10c986..026ef44e33 100644
--- a/test/parallel/test-dns-multi-channel.js
+++ b/test/parallel/test-dns-multi-channel.js
@@ -13,7 +13,7 @@ const servers = [
{
socket: dgram.createSocket('udp4'),
reply: { type: 'A', address: '5.6.7.8', ttl: 123, domain: 'example.org' }
- }
+ },
];
let waiting = servers.length;
diff --git a/test/parallel/test-dns-resolveany.js b/test/parallel/test-dns-resolveany.js
index 7cc4a046ba..0bbfe8f9f1 100644
--- a/test/parallel/test-dns-resolveany.js
+++ b/test/parallel/test-dns-resolveany.js
@@ -27,7 +27,7 @@ const answers = [
type: 'CAA',
critical: 128,
issue: 'platynum.ch'
- }
+ },
];
const server = dgram.createSocket('udp4');
diff --git a/test/parallel/test-dns-setservers-type-check.js b/test/parallel/test-dns-setservers-type-check.js
index a6add9518f..007cae4f95 100644
--- a/test/parallel/test-dns-setservers-type-check.js
+++ b/test/parallel/test-dns-setservers-type-check.js
@@ -15,7 +15,7 @@ const promiseResolver = new dns.promises.Resolver();
addresses.DNS4_SERVER,
{
address: addresses.DNS4_SERVER
- }
+ },
].forEach((val) => {
const errObj = {
code: 'ERR_INVALID_ARG_TYPE',
@@ -54,8 +54,8 @@ const promiseResolver = new dns.promises.Resolver();
[
{
address: addresses.DNS4_SERVER
- }
- ]
+ },
+ ],
].forEach((val) => {
const errObj = {
code: 'ERR_INVALID_ARG_TYPE',
@@ -104,8 +104,8 @@ const promiseResolver = new dns.promises.Resolver();
[
{
address: addresses.DNS4_SERVER
- }
- ]
+ },
+ ],
].forEach((val) => {
const errObj = {
code: 'ERR_INVALID_ARG_TYPE',
diff --git a/test/parallel/test-dns.js b/test/parallel/test-dns.js
index 6556f6c1a5..a6e17c2653 100644
--- a/test/parallel/test-dns.js
+++ b/test/parallel/test-dns.js
@@ -61,7 +61,7 @@ assert(existing.length > 0);
assert.deepStrictEqual(dns.getServers(), [
'127.0.0.1',
'192.168.1.1',
- '0.0.0.0'
+ '0.0.0.0',
]);
}
@@ -75,7 +75,7 @@ assert(existing.length > 0);
// Check for REDOS issues.
':'.repeat(100000),
'['.repeat(100000),
- '['.repeat(100000) + ']'.repeat(100000) + 'a'
+ '['.repeat(100000) + ']'.repeat(100000) + 'a',
];
invalidServers.forEach((serv) => {
assert.throws(
@@ -383,7 +383,7 @@ assert.throws(() => {
retry: 900,
expire: 1800,
minttl: 3333333333
- }
+ },
] },
];
diff --git a/test/parallel/test-domain-abort-on-uncaught.js b/test/parallel/test-domain-abort-on-uncaught.js
index e74fb436bf..08551721c1 100644
--- a/test/parallel/test-domain-abort-on-uncaught.js
+++ b/test/parallel/test-domain-abort-on-uncaught.js
@@ -191,7 +191,7 @@ const tests = [
});
});
});
- }
+ },
];
if (process.argv[2] === 'child') {
diff --git a/test/parallel/test-domain-error-types.js b/test/parallel/test-domain-error-types.js
index b7c2d6ba9b..cfd4fa801e 100644
--- a/test/parallel/test-domain-error-types.js
+++ b/test/parallel/test-domain-error-types.js
@@ -11,7 +11,7 @@ const domain = require('domain');
// https://github.com/nodejs/node/issues/28275 is fixed in debug mode.
for (const something of [
- 42, null, undefined, false, () => {}, 'string', Symbol('foo')
+ 42, null, undefined, false, () => {}, 'string', Symbol('foo'),
]) {
const d = new domain.Domain();
d.run(common.mustCall(() => {
diff --git a/test/parallel/test-domain-multiple-errors.js b/test/parallel/test-domain-multiple-errors.js
index 5b031eb1b4..fc4ccc47d3 100644
--- a/test/parallel/test-domain-multiple-errors.js
+++ b/test/parallel/test-domain-multiple-errors.js
@@ -10,7 +10,7 @@ const domain = require('domain');
const d = new domain.Domain();
const values = [
- 42, null, undefined, false, () => {}, 'string', Symbol('foo')
+ 42, null, undefined, false, () => {}, 'string', Symbol('foo'),
];
d.on('error', common.mustCall((err) => {
diff --git a/test/parallel/test-env-newprotomethod-remove-unnecessary-prototypes.js b/test/parallel/test-env-newprotomethod-remove-unnecessary-prototypes.js
index a2e2dabab0..deb7993a14 100644
--- a/test/parallel/test-env-newprotomethod-remove-unnecessary-prototypes.js
+++ b/test/parallel/test-env-newprotomethod-remove-unnecessary-prototypes.js
@@ -13,7 +13,7 @@ const { internalBinding } = require('internal/test/binding');
internalBinding('udp_wrap').UDP.prototype.send6,
internalBinding('tcp_wrap').TCP.prototype.bind,
internalBinding('udp_wrap').UDP.prototype.close,
- internalBinding('tcp_wrap').TCP.prototype.open
+ internalBinding('tcp_wrap').TCP.prototype.open,
].forEach((binding, i) => {
assert.strictEqual('prototype' in binding, false, `Test ${i} failed`);
});
diff --git a/test/parallel/test-err-name-deprecation.js b/test/parallel/test-err-name-deprecation.js
index 58dff38364..5f3fb28f10 100644
--- a/test/parallel/test-err-name-deprecation.js
+++ b/test/parallel/test-err-name-deprecation.js
@@ -9,7 +9,7 @@ common.expectWarning({
'DEP0111'],
['Directly calling process.binding(\'uv\').errname(<val>) is being ' +
'deprecated. Please make sure to use util.getSystemErrorName() instead.',
- 'DEP0119']
+ 'DEP0119'],
]
});
diff --git a/test/parallel/test-eslint-alphabetize-errors.js b/test/parallel/test-eslint-alphabetize-errors.js
index a9bc26d7f0..df822f2740 100644
--- a/test/parallel/test-eslint-alphabetize-errors.js
+++ b/test/parallel/test-eslint-alphabetize-errors.js
@@ -14,7 +14,7 @@ new RuleTester().run('alphabetize-errors', rule, {
E('AAA', 'foo');
E('BBB', 'bar');
E('CCC', 'baz');
- `
+ `,
],
invalid: [
{
@@ -24,6 +24,6 @@ new RuleTester().run('alphabetize-errors', rule, {
E('CCC', 'baz');
`,
errors: [{ message: 'Out of ASCIIbetical order - BBB >= AAA', line: 3 }]
- }
+ },
]
});
diff --git a/test/parallel/test-eslint-crypto-check.js b/test/parallel/test-eslint-crypto-check.js
index 0a973f4c9c..164149131a 100644
--- a/test/parallel/test-eslint-crypto-check.js
+++ b/test/parallel/test-eslint-crypto-check.js
@@ -27,7 +27,7 @@ new RuleTester().run('crypto-check', rule, {
common.skip("missing crypto");
}
internalBinding("crypto");
- `
+ `,
],
invalid: [
{
@@ -71,6 +71,6 @@ new RuleTester().run('crypto-check', rule, {
'}\n' +
'if (common.foo) {}\n' +
'internalBinding("crypto")'
- }
+ },
]
});
diff --git a/test/parallel/test-eslint-documented-errors.js b/test/parallel/test-eslint-documented-errors.js
index a047ecd358..e8abd38a98 100644
--- a/test/parallel/test-eslint-documented-errors.js
+++ b/test/parallel/test-eslint-documented-errors.js
@@ -14,7 +14,7 @@ new RuleTester().run('documented-errors', rule, {
valid: [
`
E('ERR_ASSERTION', 'foo');
- `
+ `,
],
invalid: [
{
@@ -30,8 +30,8 @@ new RuleTester().run('documented-errors', rule, {
message:
`doc/api/errors.md does not have an anchor for "${invalidCode}"`,
line: 2
- }
+ },
]
- }
+ },
]
});
diff --git a/test/parallel/test-eslint-eslint-check.js b/test/parallel/test-eslint-eslint-check.js
index c1ee3d501f..28ec2e1f10 100644
--- a/test/parallel/test-eslint-eslint-check.js
+++ b/test/parallel/test-eslint-eslint-check.js
@@ -18,7 +18,7 @@ new RuleTester().run('eslint-check', rule, {
'foo;',
'require("common")\n' +
'common.skipIfEslintMissing();\n' +
- 'require("../../tools/node_modules/eslint")'
+ 'require("../../tools/node_modules/eslint")',
],
invalid: [
{
@@ -28,6 +28,6 @@ new RuleTester().run('eslint-check', rule, {
output: 'require("common")\n' +
'common.skipIfEslintMissing();\n' +
'require("../../tools/node_modules/eslint").RuleTester'
- }
+ },
]
});
diff --git a/test/parallel/test-eslint-inspector-check.js b/test/parallel/test-eslint-inspector-check.js
index cf9f60e945..2d945c3da3 100644
--- a/test/parallel/test-eslint-inspector-check.js
+++ b/test/parallel/test-eslint-inspector-check.js
@@ -17,7 +17,7 @@ new RuleTester().run('inspector-check', rule, {
'foo;',
'require("common")\n' +
'common.skipIfInspectorDisabled();\n' +
- 'require("inspector")'
+ 'require("inspector")',
],
invalid: [
{
@@ -27,6 +27,6 @@ new RuleTester().run('inspector-check', rule, {
output: 'require("common")\n' +
'common.skipIfInspectorDisabled();\n' +
'require("inspector")'
- }
+ },
]
});
diff --git a/test/parallel/test-eslint-no-unescaped-regexp-dot.js b/test/parallel/test-eslint-no-unescaped-regexp-dot.js
index 69600d8073..7cf69877ca 100644
--- a/test/parallel/test-eslint-no-unescaped-regexp-dot.js
+++ b/test/parallel/test-eslint-no-unescaped-regexp-dot.js
@@ -17,7 +17,7 @@ new RuleTester().run('no-unescaped-regexp-dot', rule, {
'/.*/',
'/.?/',
'/.{5}/',
- String.raw`/\\\./`
+ String.raw`/\\\./`,
],
invalid: [
{
@@ -27,6 +27,6 @@ new RuleTester().run('no-unescaped-regexp-dot', rule, {
{
code: String.raw`/\\./`,
errors: [{ message: 'Unescaped dot character in regular expression' }]
- }
+ },
]
});
diff --git a/test/parallel/test-eslint-prefer-assert-iferror.js b/test/parallel/test-eslint-prefer-assert-iferror.js
index 342459f0b7..5ccb788339 100644
--- a/test/parallel/test-eslint-prefer-assert-iferror.js
+++ b/test/parallel/test-eslint-prefer-assert-iferror.js
@@ -14,7 +14,7 @@ new RuleTester().run('prefer-assert-iferror', rule, {
'assert.ifError(err);',
'if (err) throw somethingElse;',
'throw err;',
- 'if (err) { throw somethingElse; }'
+ 'if (err) { throw somethingElse; }',
],
invalid: [
{
@@ -30,6 +30,6 @@ new RuleTester().run('prefer-assert-iferror', rule, {
errors: [{ message: 'Use assert.ifError(error) instead.' }],
output: 'require("assert");\n' +
'assert.ifError(error);'
- }
+ },
]
});
diff --git a/test/parallel/test-eslint-prefer-assert-methods.js b/test/parallel/test-eslint-prefer-assert-methods.js
index a5829cdce3..3271f6ab18 100644
--- a/test/parallel/test-eslint-prefer-assert-methods.js
+++ b/test/parallel/test-eslint-prefer-assert-methods.js
@@ -21,7 +21,7 @@ new RuleTester().run('prefer-assert-methods', rule, {
'assert(foo != bar && baz);',
'assert.ok(foo);',
'assert.ok(foo != bar);',
- 'assert.ok(foo === bar && baz);'
+ 'assert.ok(foo === bar && baz);',
],
invalid: [
{
@@ -51,6 +51,6 @@ new RuleTester().run('prefer-assert-methods', rule, {
message: "'assert.notStrictEqual' should be used instead of '!=='"
}],
output: 'assert.notStrictEqual(foo, bar);'
- }
+ },
]
});
diff --git a/test/parallel/test-eslint-prefer-common-mustnotcall.js b/test/parallel/test-eslint-prefer-common-mustnotcall.js
index dba244a2a9..5c360bb1ec 100644
--- a/test/parallel/test-eslint-prefer-common-mustnotcall.js
+++ b/test/parallel/test-eslint-prefer-common-mustnotcall.js
@@ -16,7 +16,7 @@ new RuleTester().run('prefer-common-mustnotcall', rule, {
valid: [
'common.mustNotCall(fn)',
'common.mustCall(fn)',
- 'common.mustCall(fn, 1)'
+ 'common.mustCall(fn, 1)',
],
invalid: [
{
@@ -26,6 +26,6 @@ new RuleTester().run('prefer-common-mustnotcall', rule, {
{
code: 'common.mustCall(0)',
errors: [{ message }]
- }
+ },
]
});
diff --git a/test/parallel/test-eslint-prefer-common-mustsucceed.js b/test/parallel/test-eslint-prefer-common-mustsucceed.js
index fa16fa5f4c..302b6a0bee 100644
--- a/test/parallel/test-eslint-prefer-common-mustsucceed.js
+++ b/test/parallel/test-eslint-prefer-common-mustsucceed.js
@@ -21,7 +21,7 @@ new RuleTester({
'foo((err) => assert.ifError(err))',
'foo(function(err) { assert.ifError(err) })',
'foo(assert.ifError)',
- 'common.mustCall((err) => err)'
+ 'common.mustCall((err) => err)',
],
invalid: [
{
@@ -47,6 +47,6 @@ new RuleTester({
{
code: 'common.mustCall(function(e) {{ assert.ifError(e); }})',
errors: [{ message: msg2 }]
- }
+ },
]
});
diff --git a/test/parallel/test-eslint-prefer-util-format-errors.js b/test/parallel/test-eslint-prefer-util-format-errors.js
index 762fec28b1..a6c2662a38 100644
--- a/test/parallel/test-eslint-prefer-util-format-errors.js
+++ b/test/parallel/test-eslint-prefer-util-format-errors.js
@@ -17,7 +17,7 @@ new RuleTester({ parserOptions: { ecmaVersion: 6 } })
'E(\'ABC\', \'abc\');',
'E(\'ABC\', (arg1, arg2) => `${arg2}${arg1}`);',
'E(\'ABC\', (arg1, arg2) => `${arg1}{arg2.something}`);',
- 'E(\'ABC\', (arg1, arg2) => fn(arg1, arg2));'
+ 'E(\'ABC\', (arg1, arg2) => fn(arg1, arg2));',
],
invalid: [
{
@@ -26,6 +26,6 @@ new RuleTester({ parserOptions: { ecmaVersion: 6 } })
message: 'Please use a printf-like formatted string that ' +
'util.format can consume.'
}]
- }
+ },
]
});
diff --git a/test/parallel/test-eslint-require-common-first.js b/test/parallel/test-eslint-require-common-first.js
index 018d4185d5..b3d132e11f 100644
--- a/test/parallel/test-eslint-require-common-first.js
+++ b/test/parallel/test-eslint-require-common-first.js
@@ -14,7 +14,7 @@ new RuleTester().run('require-common-first', rule, {
{
code: 'require("common")\n' +
'require("assert")'
- }
+ },
],
invalid: [
{
@@ -22,6 +22,6 @@ new RuleTester().run('require-common-first', rule, {
'require("common")',
errors: [{ message: 'Mandatory module "common" must be loaded ' +
'before any other modules.' }]
- }
+ },
]
});
diff --git a/test/parallel/test-eslint-required-modules.js b/test/parallel/test-eslint-required-modules.js
index e81a7d4b24..c891e23507 100644
--- a/test/parallel/test-eslint-required-modules.js
+++ b/test/parallel/test-eslint-required-modules.js
@@ -46,6 +46,6 @@ new RuleTester().run('required-modules', rule, {
code: 'require("somethingElse")',
options: [{ common: 'common' }],
errors: [{ message: 'Mandatory module "common" must be loaded.' }]
- }
+ },
]
});
diff --git a/test/parallel/test-eval-strict-referenceerror.js b/test/parallel/test-eval-strict-referenceerror.js
index a96478a1be..97f2b15ba0 100644
--- a/test/parallel/test-eval-strict-referenceerror.js
+++ b/test/parallel/test-eval-strict-referenceerror.js
@@ -15,7 +15,7 @@ function test() {
'function bar() {',
'\'use strict\';',
'return foo; // foo isn\'t captured in 0.10',
- '};'
+ '};',
].join('\n');
eval(code);
diff --git a/test/parallel/test-event-emitter-special-event-names.js b/test/parallel/test-event-emitter-special-event-names.js
index 7ff781f0f9..f34faba946 100644
--- a/test/parallel/test-event-emitter-special-event-names.js
+++ b/test/parallel/test-event-emitter-special-event-names.js
@@ -19,7 +19,7 @@ ee.on('toString', handler);
assert.deepStrictEqual(ee.eventNames(), [
'__proto__',
'__defineGetter__',
- 'toString'
+ 'toString',
]);
assert.deepStrictEqual(ee.listeners('__proto__'), [handler]);
diff --git a/test/parallel/test-event-on-async-iterator.js b/test/parallel/test-event-on-async-iterator.js
index 9ad319136f..192326e12b 100644
--- a/test/parallel/test-event-on-async-iterator.js
+++ b/test/parallel/test-event-on-async-iterator.js
@@ -119,7 +119,7 @@ async function next() {
const results = await Promise.all([
iterable.next(),
iterable.next(),
- iterable.next()
+ iterable.next(),
]);
assert.deepStrictEqual(results, [{
@@ -149,7 +149,7 @@ async function nextError() {
const results = await Promise.allSettled([
iterable.next(),
iterable.next(),
- iterable.next()
+ iterable.next(),
]);
assert.deepStrictEqual(results, [{
status: 'rejected',
@@ -373,7 +373,7 @@ async function run() {
eventTargetAbortableOnBefore,
eventTargetAbortableOnAfter,
eventTargetAbortableOnAfter2,
- abortableOnAfterDone
+ abortableOnAfterDone,
];
for (const fn of funcs) {
diff --git a/test/parallel/test-eventtarget.js b/test/parallel/test-eventtarget.js
index 124fa174e9..a85e2cd7f1 100644
--- a/test/parallel/test-eventtarget.js
+++ b/test/parallel/test-eventtarget.js
@@ -233,7 +233,7 @@ let asyncTest = Promise.resolve();
{}, // No type event
undefined,
1,
- false
+ false,
].forEach((i) => {
throws(() => target.dispatchEvent(i), {
code: 'ERR_INVALID_ARG_TYPE',
@@ -254,7 +254,7 @@ let asyncTest = Promise.resolve();
'foo',
1,
{}, // No handleEvent function
- false
+ false,
].forEach((i) => throws(() => target.addEventListener('foo', i), err(i)));
}
@@ -398,7 +398,7 @@ let asyncTest = Promise.resolve();
undefined,
false,
Symbol(),
- /a/
+ /a/,
].forEach((i) => {
throws(() => target.dispatchEvent.call(i, event), {
code: 'ERR_INVALID_THIS'
diff --git a/test/parallel/test-fs-access.js b/test/parallel/test-fs-access.js
index cd4ac90d8f..9fa4dfcf1f 100644
--- a/test/parallel/test-fs-access.js
+++ b/test/parallel/test-fs-access.js
@@ -162,7 +162,7 @@ fs.accessSync(readWriteFile, mode);
1n,
{ [Symbol.toPrimitive]() { return fs.R_OK; } },
[1],
- 'r'
+ 'r',
].forEach((mode, i) => {
console.log(mode, i);
assert.throws(
@@ -186,7 +186,7 @@ fs.accessSync(readWriteFile, mode);
-1,
8,
Infinity,
- NaN
+ NaN,
].forEach((mode, i) => {
console.log(mode, i);
assert.throws(
diff --git a/test/parallel/test-fs-append-file-sync.js b/test/parallel/test-fs-append-file-sync.js
index 9914863674..0070b8f648 100644
--- a/test/parallel/test-fs-append-file-sync.js
+++ b/test/parallel/test-fs-append-file-sync.js
@@ -74,7 +74,7 @@ const filename4 = join(tmpdir.path, 'append-sync4.txt');
fs.writeFileSync(filename4, currentFileData, { mode: m });
[
- true, false, 0, 1, Infinity, () => {}, {}, [], undefined, null
+ true, false, 0, 1, Infinity, () => {}, {}, [], undefined, null,
].forEach((value) => {
assert.throws(
() => fs.appendFileSync(filename4, value, { mode: m }),
diff --git a/test/parallel/test-fs-buffertype-writesync.js b/test/parallel/test-fs-buffertype-writesync.js
index fca5b94497..5649a00569 100644
--- a/test/parallel/test-fs-buffertype-writesync.js
+++ b/test/parallel/test-fs-buffertype-writesync.js
@@ -7,7 +7,7 @@ const assert = require('assert');
const fs = require('fs');
[
- true, false, 0, 1, Infinity, () => {}, {}, [], undefined, null
+ true, false, 0, 1, Infinity, () => {}, {}, [], undefined, null,
].forEach((value) => {
assert.throws(
() => fs.writeSync(1, value),
diff --git a/test/parallel/test-fs-filehandle.js b/test/parallel/test-fs-filehandle.js
index bed9ebfa9c..818a382490 100644
--- a/test/parallel/test-fs-filehandle.js
+++ b/test/parallel/test-fs-filehandle.js
@@ -27,10 +27,10 @@ const deprecationWarning =
common.expectWarning({
'internal/test/binding': [
- 'These APIs are for internal testing only. Do not use them.'
+ 'These APIs are for internal testing only. Do not use them.',
],
'Warning': [
- `Closing file descriptor ${fdnum} on garbage collection`
+ `Closing file descriptor ${fdnum} on garbage collection`,
],
'DeprecationWarning': [[deprecationWarning, 'DEP0137']]
});
diff --git a/test/parallel/test-fs-promises-file-handle-write.js b/test/parallel/test-fs-promises-file-handle-write.js
index dcff311b3d..3c25842d8b 100644
--- a/test/parallel/test-fs-promises-file-handle-write.js
+++ b/test/parallel/test-fs-promises-file-handle-write.js
@@ -68,5 +68,5 @@ Promise.all([
validateWrite(),
validateEmptyWrite(),
validateNonUint8ArrayWrite(),
- validateNonStringValuesWrite()
+ validateNonStringValuesWrite(),
]).then(common.mustCall());
diff --git a/test/parallel/test-fs-promises-watch.js b/test/parallel/test-fs-promises-watch.js
index 4603b934c4..c8c2d9250b 100644
--- a/test/parallel/test-fs-promises-watch.js
+++ b/test/parallel/test-fs-promises-watch.js
@@ -35,7 +35,7 @@ const kCases = [
'watch2',
'bar',
'dirPath'
- )
+ ),
];
tmpdir.refresh();
diff --git a/test/parallel/test-fs-promises.js b/test/parallel/test-fs-promises.js
index e01fc2ec6a..b703279848 100644
--- a/test/parallel/test-fs-promises.js
+++ b/test/parallel/test-fs-promises.js
@@ -283,7 +283,7 @@ async function getHandle(dest) {
name: 'Error',
message: 'The lchmod() method is not implemented'
})
- )
+ ),
]);
}
diff --git a/test/parallel/test-fs-read-stream-throw-type-error.js b/test/parallel/test-fs-read-stream-throw-type-error.js
index 83b9387cc3..a01d23d5ab 100644
--- a/test/parallel/test-fs-read-stream-throw-type-error.js
+++ b/test/parallel/test-fs-read-stream-throw-type-error.js
@@ -43,7 +43,7 @@ const rangeError = {
[
{ start: 'invalid' },
{ end: 'invalid' },
- { start: 'invalid', end: 'invalid' }
+ { start: 'invalid', end: 'invalid' },
].forEach((opts) => createReadStreamErr(example, opts, typeError));
// Case 2: Should throw RangeError if either start or end is NaN
@@ -71,7 +71,7 @@ createReadStreamErr(example, { start: 5, end: 1 }, rangeError);
const NOT_SAFE_INTEGER = 2 ** 53;
[
{ start: NOT_SAFE_INTEGER, end: Infinity },
- { start: 0, end: NOT_SAFE_INTEGER }
+ { start: 0, end: NOT_SAFE_INTEGER },
].forEach((opts) =>
createReadStreamErr(example, opts, rangeError)
);
diff --git a/test/parallel/test-fs-realpath-pipe.js b/test/parallel/test-fs-realpath-pipe.js
index a2e88cce42..29fe1d3b7d 100644
--- a/test/parallel/test-fs-realpath-pipe.js
+++ b/test/parallel/test-fs-realpath-pipe.js
@@ -26,7 +26,7 @@ for (const code of [
} catch (e) {
console.error(e);
process.exit(1);
- }`
+ }`,
]) {
const child = spawnSync(process.execPath, ['-e', code], {
stdio: 'pipe'
diff --git a/test/parallel/test-fs-realpath.js b/test/parallel/test-fs-realpath.js
index 04d746243b..488e4b4cea 100644
--- a/test/parallel/test-fs-realpath.js
+++ b/test/parallel/test-fs-realpath.js
@@ -106,7 +106,7 @@ function test_simple_relative_symlink(realpath, realpathSync, callback) {
const entry = `${tmpDir}/symlink`;
const expected = `${tmpDir}/cycles/root.js`;
[
- [entry, `../${path.basename(tmpDir)}/cycles/root.js`]
+ [entry, `../${path.basename(tmpDir)}/cycles/root.js`],
].forEach(function(t) {
try { fs.unlinkSync(t[0]); } catch {}
console.log('fs.symlinkSync(%j, %j, %j)', t[1], t[0], 'file');
@@ -132,7 +132,7 @@ function test_simple_absolute_symlink(realpath, realpathSync, callback) {
const entry = `${tmpAbsDir}/symlink`;
const expected = fixtures.path('nested-index', 'one');
[
- [entry, expected]
+ [entry, expected],
].forEach(function(t) {
try { fs.unlinkSync(t[0]); } catch {}
console.error('fs.symlinkSync(%j, %j, %j)', t[1], t[0], type);
@@ -214,7 +214,7 @@ function test_cyclic_link_protection(realpath, realpathSync, callback) {
[
[entry, '../cycles/realpath-3b'],
[path.join(tmpDir, '/cycles/realpath-3b'), '../cycles/realpath-3c'],
- [path.join(tmpDir, '/cycles/realpath-3c'), '../cycles/realpath-3a']
+ [path.join(tmpDir, '/cycles/realpath-3c'), '../cycles/realpath-3a'],
].forEach(function(t) {
try { fs.unlinkSync(t[0]); } catch {}
fs.symlinkSync(t[1], t[0], 'dir');
@@ -267,7 +267,7 @@ function test_relative_input_cwd(realpath, realpathSync, callback) {
[
[entry, '../cycles/realpath-3b'],
[`${tmpDir}/cycles/realpath-3b`, '../cycles/realpath-3c'],
- [`${tmpDir}/cycles/realpath-3c`, 'root.js']
+ [`${tmpDir}/cycles/realpath-3c`, 'root.js'],
].forEach(function(t) {
const fn = t[0];
console.error('fn=%j', fn);
@@ -323,7 +323,7 @@ function test_deep_symlink_mix(realpath, realpathSync, callback) {
[`${targetsAbsDir}/nested-index/one/realpath-c`,
`${targetsAbsDir}/nested-index/two/realpath-c`],
[`${targetsAbsDir}/nested-index/two/realpath-c`,
- `${tmpDir}/cycles/root.js`]
+ `${tmpDir}/cycles/root.js`],
].forEach(function(t) {
try { fs.unlinkSync(t[0]); } catch {}
fs.symlinkSync(t[1], t[0]);
@@ -477,14 +477,14 @@ function test_abs_with_kids(realpath, realpathSync, cb) {
const root = `${tmpAbsDir}/node-test-realpath-abs-kids`;
function cleanup() {
['/a/b/c/x.txt',
- '/a/link'
+ '/a/link',
].forEach(function(file) {
try { fs.unlinkSync(root + file); } catch {}
});
['/a/b/c',
'/a/b',
'/a',
- ''
+ '',
].forEach(function(folder) {
try { fs.rmdirSync(root + folder); } catch {}
});
@@ -495,7 +495,7 @@ function test_abs_with_kids(realpath, realpathSync, cb) {
['',
'/a',
'/a/b',
- '/a/b/c'
+ '/a/b/c',
].forEach(function(folder) {
console.log(`mkdir ${root}${folder}`);
fs.mkdirSync(root + folder, 0o700);
@@ -553,7 +553,7 @@ const tests = [
test_up_multiple,
test_up_multiple_with_null_options,
test_root,
- test_root_with_null_options
+ test_root_with_null_options,
];
const numtests = tests.length;
let testsRun = 0;
diff --git a/test/parallel/test-fs-symlink-dir.js b/test/parallel/test-fs-symlink-dir.js
index 2f88ceb416..012d34c301 100644
--- a/test/parallel/test-fs-symlink-dir.js
+++ b/test/parallel/test-fs-symlink-dir.js
@@ -18,11 +18,11 @@ tmpdir.refresh();
const linkTargets = [
'relative-target',
- path.join(tmpdir.path, 'absolute-target')
+ path.join(tmpdir.path, 'absolute-target'),
];
const linkPaths = [
path.relative(process.cwd(), path.join(tmpdir.path, 'relative-path')),
- path.join(tmpdir.path, 'absolute-path')
+ path.join(tmpdir.path, 'absolute-path'),
];
function testSync(target, path) {
diff --git a/test/parallel/test-fs-syncwritestream.js b/test/parallel/test-fs-syncwritestream.js
index 8fbe665a40..35591876e8 100644
--- a/test/parallel/test-fs-syncwritestream.js
+++ b/test/parallel/test-fs-syncwritestream.js
@@ -36,6 +36,6 @@ proc.on('close', common.mustCall(() => {
assert.deepStrictEqual(JSON.parse(fs.readFileSync(filename, 'utf8')), [
{ instance: true, readable: false, writable: true },
- { instance: true, readable: false, writable: true }
+ { instance: true, readable: false, writable: true },
]);
}));
diff --git a/test/parallel/test-fs-utils-get-dirents.js b/test/parallel/test-fs-utils-get-dirents.js
index 6afe6dbca3..0cc6cd4024 100644
--- a/test/parallel/test-fs-utils-get-dirents.js
+++ b/test/parallel/test-fs-utils-get-dirents.js
@@ -61,7 +61,7 @@ const filename = 'foo';
err.message,
[
'The "path" argument must be of type string or an ' +
- 'instance of Buffer. Received type number (42)'
+ 'instance of Buffer. Received type number (42)',
].join(''));
},
));
@@ -116,7 +116,7 @@ const filename = 'foo';
err.message,
[
'The "path" argument must be of type string or an ' +
- 'instance of Buffer. Received type number (42)'
+ 'instance of Buffer. Received type number (42)',
].join(''));
},
));
diff --git a/test/parallel/test-fs-watch.js b/test/parallel/test-fs-watch.js
index 496cff90dc..6fcf6c4df6 100644
--- a/test/parallel/test-fs-watch.js
+++ b/test/parallel/test-fs-watch.js
@@ -35,7 +35,7 @@ const cases = [
'watch2',
'bar',
'dirPath'
- )
+ ),
];
const tmpdir = require('../common/tmpdir');
diff --git a/test/parallel/test-global.js b/test/parallel/test-global.js
index 598f0c7b09..dbd3b06d29 100644
--- a/test/parallel/test-global.js
+++ b/test/parallel/test-global.js
@@ -50,7 +50,7 @@ builtinModules.forEach((moduleName) => {
'performance',
'setImmediate',
'setInterval',
- 'setTimeout'
+ 'setTimeout',
];
assert.deepStrictEqual(new Set(Object.keys(global)), new Set(expected));
}
diff --git a/test/parallel/test-heapsnapshot-near-heap-limit-bounded.js b/test/parallel/test-heapsnapshot-near-heap-limit-bounded.js
index 16d1f915fe..a57b9a8fc4 100644
--- a/test/parallel/test-heapsnapshot-near-heap-limit-bounded.js
+++ b/test/parallel/test-heapsnapshot-near-heap-limit-bounded.js
@@ -21,7 +21,7 @@ const env = {
'--trace-gc',
'--heapsnapshot-near-heap-limit=1',
'--max-old-space-size=50',
- fixtures.path('workload', 'bounded.js')
+ fixtures.path('workload', 'bounded.js'),
], {
cwd: tmpdir.path,
env,
diff --git a/test/parallel/test-heapsnapshot-near-heap-limit-worker.js b/test/parallel/test-heapsnapshot-near-heap-limit-worker.js
index 48845bdad0..46744cbd44 100644
--- a/test/parallel/test-heapsnapshot-near-heap-limit-worker.js
+++ b/test/parallel/test-heapsnapshot-near-heap-limit-worker.js
@@ -14,7 +14,7 @@ const env = {
{
tmpdir.refresh();
const child = spawnSync(process.execPath, [
- fixtures.path('workload', 'grow-worker.js')
+ fixtures.path('workload', 'grow-worker.js'),
], {
cwd: tmpdir.path,
env: {
diff --git a/test/parallel/test-heapsnapshot-near-heap-limit.js b/test/parallel/test-heapsnapshot-near-heap-limit.js
index 92e06cb25e..5743f71a3f 100644
--- a/test/parallel/test-heapsnapshot-near-heap-limit.js
+++ b/test/parallel/test-heapsnapshot-near-heap-limit.js
@@ -16,7 +16,7 @@ const env = {
const child = spawnSync(process.execPath, [
'--heapsnapshot-near-heap-limit=-15',
'--max-old-space-size=50',
- fixtures.path('workload', 'grow.js')
+ fixtures.path('workload', 'grow.js'),
], {
cwd: tmpdir.path,
env,
@@ -31,7 +31,7 @@ const env = {
'--trace-gc',
'--heapsnapshot-near-heap-limit=0',
'--max-old-space-size=50',
- fixtures.path('workload', 'grow.js')
+ fixtures.path('workload', 'grow.js'),
], {
cwd: tmpdir.path,
env,
@@ -52,7 +52,7 @@ const env = {
'--trace-gc',
'--heapsnapshot-near-heap-limit=1',
'--max-old-space-size=50',
- fixtures.path('workload', 'grow.js')
+ fixtures.path('workload', 'grow.js'),
], {
cwd: tmpdir.path,
env,
@@ -78,7 +78,7 @@ const env = {
'--trace-gc',
'--heapsnapshot-near-heap-limit=3',
'--max-old-space-size=50',
- fixtures.path('workload', 'grow.js')
+ fixtures.path('workload', 'grow.js'),
], {
cwd: tmpdir.path,
env,
diff --git a/test/parallel/test-http-client-headers-array.js b/test/parallel/test-http-client-headers-array.js
index 31ee35a123..2665c3a97b 100644
--- a/test/parallel/test-http-client-headers-array.js
+++ b/test/parallel/test-http-client-headers-array.js
@@ -44,11 +44,11 @@ execute({ headers: { 'x-foo': 'boom', 'cookie': 'a=1; b=2; c=3' } });
execute({ headers: { 'x-foo': 'boom', 'cookie': [ 'a=1', 'b=2', 'c=3' ] } });
execute({ headers: [[ 'x-foo', 'boom' ], [ 'cookie', 'a=1; b=2; c=3' ]] });
execute({ headers: [
- [ 'x-foo', 'boom' ], [ 'cookie', [ 'a=1', 'b=2', 'c=3' ]]
+ [ 'x-foo', 'boom' ], [ 'cookie', [ 'a=1', 'b=2', 'c=3' ]],
] });
execute({ headers: [
[ 'x-foo', 'boom' ], [ 'cookie', 'a=1' ],
- [ 'cookie', 'b=2' ], [ 'cookie', 'c=3']
+ [ 'cookie', 'b=2' ], [ 'cookie', 'c=3'],
] });
// Authorization and Host header both missing from the second
@@ -56,5 +56,5 @@ execute({ auth: 'foo:bar', headers:
{ 'x-foo': 'boom', 'cookie': 'a=1; b=2; c=3' } });
execute({ auth: 'foo:bar', headers: [
[ 'x-foo', 'boom' ], [ 'cookie', 'a=1' ],
- [ 'cookie', 'b=2' ], [ 'cookie', 'c=3']
+ [ 'cookie', 'b=2' ], [ 'cookie', 'c=3'],
] });
diff --git a/test/parallel/test-http-client-parse-error.js b/test/parallel/test-http-client-parse-error.js
index 305a7bc170..2c18bdbede 100644
--- a/test/parallel/test-http-client-parse-error.js
+++ b/test/parallel/test-http-client-parse-error.js
@@ -29,7 +29,7 @@ const countdown = new Countdown(2, () => server.close());
const payloads = [
'HTTP/1.1 302 Object Moved\r\nContent-Length: 0\r\n\r\nhi world',
- 'bad http = should trigger parse error'
+ 'bad http = should trigger parse error',
];
// Create a TCP server
diff --git a/test/parallel/test-http-debug.js b/test/parallel/test-http-debug.js
index 4b1c093c66..3907412203 100644
--- a/test/parallel/test-http-debug.js
+++ b/test/parallel/test-http-debug.js
@@ -7,7 +7,7 @@ const path = require('path');
process.env.NODE_DEBUG = 'http';
const { stderr } = child_process.spawnSync(process.execPath, [
- path.resolve(__dirname, 'test-http-conn-reset.js')
+ path.resolve(__dirname, 'test-http-conn-reset.js'),
], { encoding: 'utf8' });
assert(stderr.match(/Setting the NODE_DEBUG environment variable to 'http' can expose sensitive data \(such as passwords, tokens and authentication headers\) in the resulting log\./),
diff --git a/test/parallel/test-http-default-port.js b/test/parallel/test-http-default-port.js
index a5af439a8e..2005487502 100644
--- a/test/parallel/test-http-default-port.js
+++ b/test/parallel/test-http-default-port.js
@@ -37,7 +37,7 @@ const options = {
for (const { mod, createServer } of [
{ mod: http, createServer: http.createServer },
- { mod: https, createServer: https.createServer.bind(null, options) }
+ { mod: https, createServer: https.createServer.bind(null, options) },
]) {
const server = createServer(common.mustCall((req, res) => {
assert.strictEqual(req.headers.host, hostExpect);
diff --git a/test/parallel/test-http-header-validators.js b/test/parallel/test-http-header-validators.js
index fb23bd4885..89cf974da0 100644
--- a/test/parallel/test-http-header-validators.js
+++ b/test/parallel/test-http-header-validators.js
@@ -14,7 +14,7 @@ console.log('validateHeaderName');
'user-agent',
'USER-AGENT',
'User-Agent',
- 'x-forwarded-for'
+ 'x-forwarded-for',
].forEach((name) => {
console.log('does not throw for "%s"', name);
validateHeaderName(name);
diff --git a/test/parallel/test-http-host-header-ipv6-fail.js b/test/parallel/test-http-host-header-ipv6-fail.js
index 3552e38856..e84e9ab05b 100644
--- a/test/parallel/test-http-host-header-ipv6-fail.js
+++ b/test/parallel/test-http-host-header-ipv6-fail.js
@@ -15,7 +15,7 @@ const net = require('net');
const requests = [
{ host: 'foo:1234', headers: { expectedhost: 'foo:1234:80' } },
- { host: '::1', headers: { expectedhost: '[::1]:80' } }
+ { host: '::1', headers: { expectedhost: '[::1]:80' } },
];
function createLocalConnection(options) {
diff --git a/test/parallel/test-http-invalidheaderfield2.js b/test/parallel/test-http-invalidheaderfield2.js
index 40415d9c36..1b4e9e6edb 100644
--- a/test/parallel/test-http-invalidheaderfield2.js
+++ b/test/parallel/test-http-invalidheaderfield2.js
@@ -25,7 +25,7 @@ const { _checkIsHttpToken, _checkInvalidHeaderChar } = require('_http_common');
'It\'s_fun',
'2*3',
'4+2',
- '3.14159265359'
+ '3.14159265359',
].forEach(function(str) {
assert.strictEqual(
_checkIsHttpToken(str), true,
@@ -51,7 +51,7 @@ const { _checkIsHttpToken, _checkInvalidHeaderChar } = require('_http_common');
'End)',
'End]',
'"Quote"',
- 'This,That'
+ 'This,That',
].forEach(function(str) {
assert.strictEqual(
_checkIsHttpToken(str), false,
@@ -64,7 +64,7 @@ const { _checkIsHttpToken, _checkInvalidHeaderChar } = require('_http_common');
'foo bar',
'foo\tbar',
'0123456789ABCdef',
- '!@#$%^&*()-_=+\\;\':"[]{}<>,./?|~`'
+ '!@#$%^&*()-_=+\\;\':"[]{}<>,./?|~`',
].forEach(function(str) {
assert.strictEqual(
_checkInvalidHeaderChar(str), false,
@@ -80,7 +80,7 @@ const { _checkIsHttpToken, _checkInvalidHeaderChar } = require('_http_common');
'\x7FMe!',
'Testing 123\x00',
'foo\vbar',
- 'Ding!\x07'
+ 'Ding!\x07',
].forEach(function(str) {
assert.strictEqual(
_checkInvalidHeaderChar(str), true,
diff --git a/test/parallel/test-http-max-headers-count.js b/test/parallel/test-http-max-headers-count.js
index 9fcfe316e3..b707c62bfb 100644
--- a/test/parallel/test-http-max-headers-count.js
+++ b/test/parallel/test-http-max-headers-count.js
@@ -36,7 +36,7 @@ for (let i = 0; i < N; ++i) {
const maxAndExpected = [ // for server
[50, 50],
[1500, 102],
- [0, N + 2] // Host and Connection
+ [0, N + 2], // Host and Connection
];
let max = maxAndExpected[requests][0];
let expected = maxAndExpected[requests][1];
@@ -57,7 +57,7 @@ server.listen(0, function() {
const maxAndExpected = [ // for client
[20, 20],
[1200, 103],
- [0, N + 3] // Connection, Date and Transfer-Encoding
+ [0, N + 3], // Connection, Date and Transfer-Encoding
];
doRequest();
diff --git a/test/parallel/test-http-mutable-headers.js b/test/parallel/test-http-mutable-headers.js
index 755a4dd661..46f57832af 100644
--- a/test/parallel/test-http-mutable-headers.js
+++ b/test/parallel/test-http-mutable-headers.js
@@ -36,7 +36,7 @@ let test = 'headers';
const content = 'hello world\n';
const cookies = [
'session_token=; path=/; expires=Sun, 15-Sep-2030 13:48:52 GMT',
- 'prefers_open_id=; path=/; expires=Thu, 01-Jan-1970 00:00:00 GMT'
+ 'prefers_open_id=; path=/; expires=Thu, 01-Jan-1970 00:00:00 GMT',
];
const s = http.createServer(common.mustCall((req, res) => {
@@ -121,7 +121,7 @@ const s = http.createServer(common.mustCall((req, res) => {
true,
{},
{ toString: () => 'X-TEST-HEADER2' },
- () => { }
+ () => { },
].forEach((val) => {
assert.throws(
() => res.hasHeader(val),
diff --git a/test/parallel/test-http-parser-freed-before-upgrade.js b/test/parallel/test-http-parser-freed-before-upgrade.js
index 4ba1de9501..d0f1409f1d 100644
--- a/test/parallel/test-http-parser-freed-before-upgrade.js
+++ b/test/parallel/test-http-parser-freed-before-upgrade.js
@@ -12,7 +12,7 @@ server.on('upgrade', common.mustCall((request, socket) => {
'HTTP/1.1 101 Switching Protocols',
'Connection: Upgrade',
'Upgrade: WebSocket',
- '\r\n'
+ '\r\n',
].join('\r\n'));
}));
diff --git a/test/parallel/test-http-parser-lazy-loaded.js b/test/parallel/test-http-parser-lazy-loaded.js
index 3c4a7e7ce9..44bb59f052 100644
--- a/test/parallel/test-http-parser-lazy-loaded.js
+++ b/test/parallel/test-http-parser-lazy-loaded.js
@@ -31,7 +31,7 @@ assert.strictEqual(parser.test_type, DummyParser.REQUEST);
if (process.argv[2] !== 'child') {
// Also test in a child process with IPC (specific case of https://github.com/nodejs/node/issues/23716)
const child = spawn(process.execPath, [
- '--expose-internals', __filename, 'child'
+ '--expose-internals', __filename, 'child',
], {
stdio: ['inherit', 'inherit', 'inherit', 'ipc']
});
diff --git a/test/parallel/test-http-perf_hooks.js b/test/parallel/test-http-perf_hooks.js
index e02eab886f..826211472f 100644
--- a/test/parallel/test-http-perf_hooks.js
+++ b/test/parallel/test-http-perf_hooks.js
@@ -53,7 +53,7 @@ server.listen(0, common.mustCall(async () => {
path: '/',
method: 'POST',
data: expected
- })
+ }),
]);
server.close();
}));
diff --git a/test/parallel/test-http-proxy.js b/test/parallel/test-http-proxy.js
index 6a986024af..af3497630b 100644
--- a/test/parallel/test-http-proxy.js
+++ b/test/parallel/test-http-proxy.js
@@ -27,7 +27,7 @@ const url = require('url');
const cookies = [
'session_token=; path=/; expires=Sun, 15-Sep-2030 13:48:52 GMT',
- 'prefers_open_id=; path=/; expires=Thu, 01-Jan-1970 00:00:00 GMT'
+ 'prefers_open_id=; path=/; expires=Thu, 01-Jan-1970 00:00:00 GMT',
];
const headers = { 'content-type': 'text/plain',
diff --git a/test/parallel/test-http-raw-headers.js b/test/parallel/test-http-raw-headers.js
index 8ce20db351..d77a7cacc6 100644
--- a/test/parallel/test-http-raw-headers.js
+++ b/test/parallel/test-http-raw-headers.js
@@ -34,7 +34,7 @@ http.createServer(function(req, res) {
'x-BaR',
'yoyoyo',
'Connection',
- 'close'
+ 'close',
];
const expectHeaders = {
'host': `localhost:${this.address().port}`,
@@ -50,7 +50,7 @@ http.createServer(function(req, res) {
'X-bAr',
'yOyOyOy',
'X-baR',
- 'OyOyOyO'
+ 'OyOyOyO',
];
const expectTrailers = { 'x-bar': 'yOyOyOy, OyOyOyO, yOyOyOy, OyOyOyO' };
@@ -70,7 +70,7 @@ http.createServer(function(req, res) {
['x-fOo', 'xOxOxOx'],
['x-foO', 'OxOxOxO'],
['X-fOo', 'xOxOxOx'],
- ['X-foO', 'OxOxOxO']
+ ['X-foO', 'OxOxOxO'],
]);
res.end('x f o o');
}).listen(0, function() {
@@ -79,7 +79,7 @@ http.createServer(function(req, res) {
['x-bAr', 'yOyOyOy'],
['x-baR', 'OyOyOyO'],
['X-bAr', 'yOyOyOy'],
- ['X-baR', 'OyOyOyO']
+ ['X-baR', 'OyOyOyO'],
]);
req.setHeader('transfer-ENCODING', 'CHUNKED');
req.setHeader('x-BaR', 'yoyoyo');
@@ -93,7 +93,7 @@ http.createServer(function(req, res) {
'Connection',
'close',
'Transfer-Encoding',
- 'chunked'
+ 'chunked',
];
const expectHeaders = {
'trailer': 'x-foo',
@@ -114,7 +114,7 @@ http.createServer(function(req, res) {
'X-fOo',
'xOxOxOx',
'X-foO',
- 'OxOxOxO'
+ 'OxOxOxO',
];
const expectTrailers = { 'x-foo': 'xOxOxOx, OxOxOxO, xOxOxOx, OxOxOxO' };
diff --git a/test/parallel/test-http-response-multiheaders.js b/test/parallel/test-http-response-multiheaders.js
index 31cb59546c..39840ce069 100644
--- a/test/parallel/test-http-response-multiheaders.js
+++ b/test/parallel/test-http-response-multiheaders.js
@@ -26,7 +26,7 @@ const norepeat = [
'last-modified',
'server',
'age',
- 'expires'
+ 'expires',
];
const runCount = 2;
diff --git a/test/parallel/test-http-response-status-message.js b/test/parallel/test-http-response-status-message.js
index c4256d9e5a..3c22e40b43 100644
--- a/test/parallel/test-http-response-status-message.js
+++ b/test/parallel/test-http-response-status-message.js
@@ -36,7 +36,7 @@ const testCases = [
{ path: '/missing', statusMessage: '',
response: 'HTTP/1.1 200 \r\n\r\n' },
{ path: '/missing-no-space', statusMessage: '',
- response: 'HTTP/1.1 200\r\n\r\n' }
+ response: 'HTTP/1.1 200\r\n\r\n' },
];
testCases.findByPath = function(path) {
const matching = this.filter(function(testCase) {
diff --git a/test/parallel/test-http-server-keepalive-end.js b/test/parallel/test-http-server-keepalive-end.js
index 8ebdecb97c..9d1bc0bfc0 100644
--- a/test/parallel/test-http-server-keepalive-end.js
+++ b/test/parallel/test-http-server-keepalive-end.js
@@ -31,7 +31,7 @@ server.listen(0, common.mustCall(() => {
'Content-Length: 11',
'',
'hello world',
- ''
+ '',
].join('\r\n');
client.end(req);
diff --git a/test/parallel/test-http-server-keepalive-req-gc.js b/test/parallel/test-http-server-keepalive-req-gc.js
index e94845d38d..0c68ebab76 100644
--- a/test/parallel/test-http-server-keepalive-req-gc.js
+++ b/test/parallel/test-http-server-keepalive-req-gc.js
@@ -32,7 +32,7 @@ server.listen(0, common.mustCall(() => {
'Content-Length: 11',
'',
'hello world',
- ''
+ '',
].join('\r\n');
client.write(req);
diff --git a/test/parallel/test-http-should-keep-alive.js b/test/parallel/test-http-should-keep-alive.js
index 038af47ee4..dfc99cf4f3 100644
--- a/test/parallel/test-http-should-keep-alive.js
+++ b/test/parallel/test-http-should-keep-alive.js
@@ -32,7 +32,7 @@ const SERVER_RESPONSES = [
'HTTP/1.0 200 ok\r\nContent-Length: 0\r\nConnection: close\r\n\r\n',
'HTTP/1.1 200 ok\r\nContent-Length: 0\r\n\r\n',
'HTTP/1.1 200 ok\r\nContent-Length: 0\r\nConnection: keep-alive\r\n\r\n',
- 'HTTP/1.1 200 ok\r\nContent-Length: 0\r\nConnection: close\r\n\r\n'
+ 'HTTP/1.1 200 ok\r\nContent-Length: 0\r\nConnection: close\r\n\r\n',
];
const SHOULD_KEEP_ALIVE = [
false, // HTTP/1.0, default
@@ -40,7 +40,7 @@ const SHOULD_KEEP_ALIVE = [
false, // HTTP/1.0, Connection: close
true, // HTTP/1.1, default
true, // HTTP/1.1, Connection: keep-alive
- false // HTTP/1.1, Connection: close
+ false, // HTTP/1.1, Connection: close
];
http.globalAgent.maxSockets = 5;
diff --git a/test/parallel/test-http-upgrade-client.js b/test/parallel/test-http-upgrade-client.js
index 8fe756f469..ea6972a18c 100644
--- a/test/parallel/test-http-upgrade-client.js
+++ b/test/parallel/test-http-upgrade-client.js
@@ -60,8 +60,8 @@ server.listen(0, '127.0.0.1', common.mustCall(function() {
['Host', 'echo.websocket.org'],
['Connection', 'Upgrade'],
['Upgrade', 'websocket'],
- ['Origin', 'http://www.websocket.org']
- ]
+ ['Origin', 'http://www.websocket.org'],
+ ],
];
const countdown = new Countdown(headers.length, () => server.close());
diff --git a/test/parallel/test-http-url.parse-only-support-http-https-protocol.js b/test/parallel/test-http-url.parse-only-support-http-https-protocol.js
index 6dcb2a852e..9b2a575ba7 100644
--- a/test/parallel/test-http-url.parse-only-support-http-https-protocol.js
+++ b/test/parallel/test-http-url.parse-only-support-http-https-protocol.js
@@ -31,7 +31,7 @@ const invalidUrls = [
'ftp://www.example.com',
'javascript:alert(\'hello\');',
'xmpp:foo@bar.com',
- 'f://some.host/path'
+ 'f://some.host/path',
];
invalidUrls.forEach((invalid) => {
diff --git a/test/parallel/test-http2-altsvc.js b/test/parallel/test-http2-altsvc.js
index 39a3ca97b7..c5abfc3326 100644
--- a/test/parallel/test-http2-altsvc.js
+++ b/test/parallel/test-http2-altsvc.js
@@ -75,7 +75,7 @@ server.on('session', common.mustCall((session) => {
'abc:',
new URL('abc:'),
{ origin: 'null' },
- { origin: '' }
+ { origin: '' },
].forEach((input) => {
assert.throws(
() => session.altsvc('h2=":8000', input),
diff --git a/test/parallel/test-http2-client-destroy.js b/test/parallel/test-http2-client-destroy.js
index 189a6f55a5..c407ef1f50 100644
--- a/test/parallel/test-http2-client-destroy.js
+++ b/test/parallel/test-http2-client-destroy.js
@@ -15,7 +15,7 @@ const { getEventListeners } = require('events');
server.listen(0, common.mustCall(() => {
const destroyCallbacks = [
(client) => client.destroy(),
- (client) => client[kSocket].destroy()
+ (client) => client[kSocket].destroy(),
];
const countdown = new Countdown(destroyCallbacks.length, () => {
diff --git a/test/parallel/test-http2-client-onconnect-errors.js b/test/parallel/test-http2-client-onconnect-errors.js
index 788386ae86..04cbfe5bef 100644
--- a/test/parallel/test-http2-client-onconnect-errors.js
+++ b/test/parallel/test-http2-client-onconnect-errors.js
@@ -21,7 +21,7 @@ const { NghttpError } = require('internal/http2/util');
const specificTestKeys = [
'NGHTTP2_ERR_STREAM_ID_NOT_AVAILABLE',
- 'NGHTTP2_ERR_INVALID_ARGUMENT'
+ 'NGHTTP2_ERR_INVALID_ARGUMENT',
];
const specificTests = [
diff --git a/test/parallel/test-http2-client-settings-before-connect.js b/test/parallel/test-http2-client-settings-before-connect.js
index a02a264469..406ddd86ab 100644
--- a/test/parallel/test-http2-client-settings-before-connect.js
+++ b/test/parallel/test-http2-client-settings-before-connect.js
@@ -38,7 +38,7 @@ server.listen(0, common.mustCall(() => {
['enablePush', 1, TypeError],
['enablePush', 0, TypeError],
['enablePush', null, TypeError],
- ['enablePush', {}, TypeError]
+ ['enablePush', {}, TypeError],
].forEach(([name, value, errorType]) =>
assert.throws(
() => client.settings({ [name]: value }),
diff --git a/test/parallel/test-http2-client-write-empty-string.js b/test/parallel/test-http2-client-write-empty-string.js
index 087a498a37..f0f0b8f012 100644
--- a/test/parallel/test-http2-client-write-empty-string.js
+++ b/test/parallel/test-http2-client-write-empty-string.js
@@ -9,7 +9,7 @@ const http2 = require('http2');
for (const chunkSequence of [
[ '' ],
- [ '', '' ]
+ [ '', '' ],
]) {
const server = http2.createServer();
server.on('stream', common.mustCall((stream, headers, flags) => {
diff --git a/test/parallel/test-http2-compat-serverrequest-trailers.js b/test/parallel/test-http2-compat-serverrequest-trailers.js
index 735ff1345e..620ae69029 100644
--- a/test/parallel/test-http2-compat-serverrequest-trailers.js
+++ b/test/parallel/test-http2-compat-serverrequest-trailers.js
@@ -35,7 +35,7 @@ server.listen(0, common.mustCall(function() {
'x-foo',
'OxOxOxO',
'x-foo-test',
- 'test, test'
+ 'test, test',
], request.rawTrailers);
assert.strictEqual(data, 'test\ntest');
response.end();
diff --git a/test/parallel/test-http2-compat-serverresponse-destroy.js b/test/parallel/test-http2-compat-serverresponse-destroy.js
index 0d73c82c2d..94d67330e8 100644
--- a/test/parallel/test-http2-compat-serverresponse-destroy.js
+++ b/test/parallel/test-http2-compat-serverresponse-destroy.js
@@ -11,7 +11,7 @@ const Countdown = require('../common/countdown');
const errors = [
'test-error',
- Error('test')
+ Error('test'),
];
let nextError;
diff --git a/test/parallel/test-http2-compat-serverresponse-headers.js b/test/parallel/test-http2-compat-serverresponse-headers.js
index 19720b1e41..8b9b6d6927 100644
--- a/test/parallel/test-http2-compat-serverresponse-headers.js
+++ b/test/parallel/test-http2-compat-serverresponse-headers.js
@@ -58,7 +58,7 @@ server.listen(0, common.mustCall(function() {
':method',
':path',
':authority',
- ':scheme'
+ ':scheme',
].forEach((header) => assert.throws(
() => response.setHeader(header, 'foobar'),
{
diff --git a/test/parallel/test-http2-compat-serverresponse-writehead-array.js b/test/parallel/test-http2-compat-serverresponse-writehead-array.js
index d856165d09..c28f7329c1 100644
--- a/test/parallel/test-http2-compat-serverresponse-writehead-array.js
+++ b/test/parallel/test-http2-compat-serverresponse-writehead-array.js
@@ -14,7 +14,7 @@ server.listen(0, common.mustCall(() => {
server.once('request', common.mustCall((request, response) => {
const returnVal = response.writeHead(200, [
['foo', 'bar'],
- ['ABC', 123]
+ ['ABC', 123],
]);
assert.strictEqual(returnVal, response);
response.end(common.mustCall(() => { server.close(); }));
diff --git a/test/parallel/test-http2-cookies.js b/test/parallel/test-http2-cookies.js
index fcd6b84758..a270c1d73b 100644
--- a/test/parallel/test-http2-cookies.js
+++ b/test/parallel/test-http2-cookies.js
@@ -11,7 +11,7 @@ const server = h2.createServer();
const setCookie = [
'a=b',
'c=d; Wed, 21 Oct 2015 07:28:00 GMT; Secure; HttpOnly',
- 'e=f'
+ 'e=f',
];
// We use the lower-level API here
diff --git a/test/parallel/test-http2-create-client-connect.js b/test/parallel/test-http2-create-client-connect.js
index 5723fcecd6..9859fe1067 100644
--- a/test/parallel/test-http2-create-client-connect.js
+++ b/test/parallel/test-http2-create-client-connect.js
@@ -22,7 +22,7 @@ const url = require('url');
[new URL(`http://localhost:${port}`)],
[url.parse(`http://localhost:${port}`)],
[{ port }, { protocol: 'http:' }],
- [{ port, hostname: '127.0.0.1' }, { protocol: 'http:' }]
+ [{ port, hostname: '127.0.0.1' }, { protocol: 'http:' }],
];
const serverClose = new Countdown(items.length + 1,
@@ -66,7 +66,7 @@ const url = require('url');
[new URL(`https://localhost:${port}`), opts],
[url.parse(`https://localhost:${port}`), opts],
[{ port: port, protocol: 'https:' }, opts],
- [{ port: port, hostname: '127.0.0.1', protocol: 'https:' }, opts]
+ [{ port: port, hostname: '127.0.0.1', protocol: 'https:' }, opts],
];
const serverClose = new Countdown(items.length,
diff --git a/test/parallel/test-http2-debug.js b/test/parallel/test-http2-debug.js
index 0d6b5f677c..a465f74af2 100644
--- a/test/parallel/test-http2-debug.js
+++ b/test/parallel/test-http2-debug.js
@@ -9,7 +9,7 @@ const path = require('path');
process.env.NODE_DEBUG_NATIVE = 'http2';
process.env.NODE_DEBUG = 'http2';
const { stdout, stderr } = child_process.spawnSync(process.execPath, [
- path.resolve(__dirname, 'test-http2-ping.js')
+ path.resolve(__dirname, 'test-http2-ping.js'),
], { encoding: 'utf8' });
assert(stderr.match(/Setting the NODE_DEBUG environment variable to 'http2' can expose sensitive data \(such as passwords, tokens and authentication headers\) in the resulting log\.\r?\n/),
diff --git a/test/parallel/test-http2-error-order.js b/test/parallel/test-http2-error-order.js
index 8bf0f03dba..4ea71cf1d0 100644
--- a/test/parallel/test-http2-error-order.js
+++ b/test/parallel/test-http2-error-order.js
@@ -12,7 +12,7 @@ const expected = [
'Stream:created',
'Stream:error',
'Stream:close',
- 'Request:error'
+ 'Request:error',
];
const server = createServer();
diff --git a/test/parallel/test-http2-getpackedsettings.js b/test/parallel/test-http2-getpackedsettings.js
index 374e537d56..4f5970522f 100644
--- a/test/parallel/test-http2-getpackedsettings.js
+++ b/test/parallel/test-http2-getpackedsettings.js
@@ -28,7 +28,7 @@ assert.deepStrictEqual(val, check);
['maxHeaderListSize', 0],
['maxHeaderListSize', 2 ** 32 - 1],
['maxHeaderSize', 0],
- ['maxHeaderSize', 2 ** 32 - 1]
+ ['maxHeaderSize', 2 ** 32 - 1],
].forEach((i) => {
// Valid options should not throw.
http2.getPackedSettings({ [i[0]]: i[1] });
@@ -49,7 +49,7 @@ http2.getPackedSettings({ enablePush: false });
['maxHeaderListSize', -1],
['maxHeaderListSize', 2 ** 32],
['maxHeaderSize', -1],
- ['maxHeaderSize', 2 ** 32]
+ ['maxHeaderSize', 2 ** 32],
].forEach((i) => {
assert.throws(() => {
http2.getPackedSettings({ [i[0]]: i[1] });
@@ -61,7 +61,7 @@ http2.getPackedSettings({ enablePush: false });
});
[
- 1, null, '', Infinity, new Date(), {}, NaN, [false]
+ 1, null, '', Infinity, new Date(), {}, NaN, [false],
].forEach((i) => {
assert.throws(() => {
http2.getPackedSettings({ enablePush: i });
@@ -73,7 +73,7 @@ http2.getPackedSettings({ enablePush: false });
});
[
- 1, null, '', Infinity, new Date(), {}, NaN, [false]
+ 1, null, '', Infinity, new Date(), {}, NaN, [false],
].forEach((i) => {
assert.throws(() => {
http2.getPackedSettings({ enableConnectProtocol: i });
@@ -92,7 +92,7 @@ http2.getPackedSettings({ enablePush: false });
0x00, 0x04, 0x00, 0x00, 0x00, 0x64,
0x00, 0x05, 0x00, 0x00, 0x4e, 0x20,
0x00, 0x06, 0x00, 0x00, 0x00, 0x64,
- 0x00, 0x08, 0x00, 0x00, 0x00, 0x00
+ 0x00, 0x08, 0x00, 0x00, 0x00, 0x00,
]);
const packed = http2.getPackedSettings({
diff --git a/test/parallel/test-http2-misbehaving-flow-control-paused.js b/test/parallel/test-http2-misbehaving-flow-control-paused.js
index d8f37c4394..e54bb83238 100644
--- a/test/parallel/test-http2-misbehaving-flow-control-paused.js
+++ b/test/parallel/test-http2-misbehaving-flow-control-paused.js
@@ -25,13 +25,13 @@ const preamble = Buffer.from([
0xa0, 0xe4, 0x1d, 0x13, 0x9d, 0x09, 0xb8, 0xf0, 0x1e, 0x07, 0x53,
0x03, 0x2a, 0x2f, 0x2a, 0x90, 0x7a, 0x8a, 0xaa, 0x69, 0xd2, 0x9a,
0xc4, 0xc0, 0x57, 0x0b, 0xcb, 0x87, 0x0f, 0x0d, 0x83, 0x08, 0x00,
- 0x0f
+ 0x0f,
]);
const data = Buffer.from([
0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0d,
0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x0a, 0x68, 0x65, 0x6c,
- 0x6c, 0x6f, 0x0a, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x0a
+ 0x6c, 0x6f, 0x0a, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x0a,
]);
// This is testing the case of a misbehaving client that is not paying
diff --git a/test/parallel/test-http2-misbehaving-flow-control.js b/test/parallel/test-http2-misbehaving-flow-control.js
index 97f8c17f4f..6774be2237 100644
--- a/test/parallel/test-http2-misbehaving-flow-control.js
+++ b/test/parallel/test-http2-misbehaving-flow-control.js
@@ -25,7 +25,7 @@ const preamble = Buffer.from([
0xa0, 0xe4, 0x1d, 0x13, 0x9d, 0x09, 0xb8, 0xf0, 0x1e, 0x07, 0x53,
0x03, 0x2a, 0x2f, 0x2a, 0x90, 0x7a, 0x8a, 0xaa, 0x69, 0xd2, 0x9a,
0xc4, 0xc0, 0x57, 0x0b, 0xcb, 0x87, 0x0f, 0x0d, 0x83, 0x08, 0x00,
- 0x0f
+ 0x0f,
]);
const data = Buffer.from([
@@ -46,7 +46,7 @@ const data = Buffer.from([
0x6c, 0x6f, 0x0a, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x0a,
0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0d,
0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x0a, 0x68, 0x65, 0x6c,
- 0x6c, 0x6f, 0x0a, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x0a
+ 0x6c, 0x6f, 0x0a, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x0a,
]);
// This is testing the case of a misbehaving client that is not paying
diff --git a/test/parallel/test-http2-misused-pseudoheaders.js b/test/parallel/test-http2-misused-pseudoheaders.js
index 2ae3a1ddbf..230843c619 100644
--- a/test/parallel/test-http2-misused-pseudoheaders.js
+++ b/test/parallel/test-http2-misused-pseudoheaders.js
@@ -13,7 +13,7 @@ server.on('stream', common.mustCall((stream) => {
':path',
':authority',
':method',
- ':scheme'
+ ':scheme',
].forEach((i) => {
assert.throws(() => stream.respond({ [i]: '/' }),
{
diff --git a/test/parallel/test-http2-multiheaders-raw.js b/test/parallel/test-http2-multiheaders-raw.js
index 32bf9d0543..8e80a1c631 100644
--- a/test/parallel/test-http2-multiheaders-raw.js
+++ b/test/parallel/test-http2-multiheaders-raw.js
@@ -31,7 +31,7 @@ server.on('stream', common.mustCall((stream, headers, flags, rawHeaders) => {
'www-authenticate',
'baz',
'test',
- 'foo, bar, baz'
+ 'foo, bar, baz',
];
assert.deepStrictEqual(rawHeaders, expected);
diff --git a/test/parallel/test-http2-origin.js b/test/parallel/test-http2-origin.js
index 519e8cb1a3..5193af6d99 100644
--- a/test/parallel/test-http2-origin.js
+++ b/test/parallel/test-http2-origin.js
@@ -85,7 +85,7 @@ const ca = readKey('fake-startcom-root-cert.pem', 'binary');
const client = connect(originSet[0], { ca });
const checks = [
['https://foo.org', 'https://bar.org'],
- ['https://example.org', 'https://example.com']
+ ['https://example.org', 'https://example.com'],
];
const countdown = new Countdown(3, () => {
diff --git a/test/parallel/test-http2-server-push-stream-errors.js b/test/parallel/test-http2-server-push-stream-errors.js
index 8e4ca37b28..dae037c04f 100644
--- a/test/parallel/test-http2-server-push-stream-errors.js
+++ b/test/parallel/test-http2-server-push-stream-errors.js
@@ -20,7 +20,7 @@ const { NghttpError } = require('internal/http2/util');
const specificTestKeys = [
'NGHTTP2_ERR_STREAM_ID_NOT_AVAILABLE',
- 'NGHTTP2_ERR_STREAM_CLOSED'
+ 'NGHTTP2_ERR_STREAM_CLOSED',
];
const specificTests = [
diff --git a/test/parallel/test-http2-server-rst-stream.js b/test/parallel/test-http2-server-rst-stream.js
index e76db1bf1a..9f37ce7147 100644
--- a/test/parallel/test-http2-server-rst-stream.js
+++ b/test/parallel/test-http2-server-rst-stream.js
@@ -21,7 +21,7 @@ const tests = [
[NGHTTP2_PROTOCOL_ERROR, true, 'NGHTTP2_PROTOCOL_ERROR'],
[NGHTTP2_CANCEL, false],
[NGHTTP2_REFUSED_STREAM, true, 'NGHTTP2_REFUSED_STREAM'],
- [NGHTTP2_INTERNAL_ERROR, true, 'NGHTTP2_INTERNAL_ERROR']
+ [NGHTTP2_INTERNAL_ERROR, true, 'NGHTTP2_INTERNAL_ERROR'],
];
const server = http2.createServer();
diff --git a/test/parallel/test-http2-server-shutdown-options-errors.js b/test/parallel/test-http2-server-shutdown-options-errors.js
index 643d173f78..e6a69b5462 100644
--- a/test/parallel/test-http2-server-shutdown-options-errors.js
+++ b/test/parallel/test-http2-server-shutdown-options-errors.js
@@ -13,7 +13,7 @@ const types = [
{},
[],
null,
- new Date()
+ new Date(),
];
server.on('stream', common.mustCall((stream) => {
diff --git a/test/parallel/test-http2-session-settings.js b/test/parallel/test-http2-session-settings.js
index a31682f291..571ee87d93 100644
--- a/test/parallel/test-http2-session-settings.js
+++ b/test/parallel/test-http2-session-settings.js
@@ -103,7 +103,7 @@ server.listen(
['maxHeaderListSize', -1],
['maxHeaderListSize', 2 ** 32],
['maxHeaderSize', -1],
- ['maxHeaderSize', 2 ** 32]
+ ['maxHeaderSize', 2 ** 32],
].forEach((i) => {
const settings = {};
settings[i[0]] = i[1];
diff --git a/test/parallel/test-http2-single-headers.js b/test/parallel/test-http2-single-headers.js
index 6f20c1b356..c10623b9be 100644
--- a/test/parallel/test-http2-single-headers.js
+++ b/test/parallel/test-http2-single-headers.js
@@ -19,7 +19,7 @@ const singles = [
'if-unmodified-since',
'from',
'location',
- 'max-forwards'
+ 'max-forwards',
];
server.on('stream', common.mustNotCall());
diff --git a/test/parallel/test-http2-tls-disconnect.js b/test/parallel/test-http2-tls-disconnect.js
index 2e635fe137..42c58c8a4e 100644
--- a/test/parallel/test-http2-tls-disconnect.js
+++ b/test/parallel/test-http2-tls-disconnect.js
@@ -21,7 +21,7 @@ const server = http2.createSecureServer({ key, cert }, (request, response) => {
server.listen(0, () => {
const proc = child_process.spawn('h2load', [
'-n', '1000',
- `https://localhost:${server.address().port}/`
+ `https://localhost:${server.address().port}/`,
]);
proc.on('error', (err) => {
if (err.code === 'ENOENT')
diff --git a/test/parallel/test-http2-util-asserts.js b/test/parallel/test-http2-util-asserts.js
index 5bbc1cde43..29ba818049 100644
--- a/test/parallel/test-http2-util-asserts.js
+++ b/test/parallel/test-http2-util-asserts.js
@@ -13,7 +13,7 @@ const {
{},
Object.create(null),
new Date(),
- new (class Foo {})()
+ new (class Foo {})(),
].forEach((input) => {
assertIsObject(input, 'foo', 'Object');
});
@@ -25,7 +25,7 @@ const {
NaN,
Infinity,
[],
- [{}]
+ [{}],
].forEach((input) => {
assert.throws(
() => assertIsObject(input, 'foo', 'Object'),
diff --git a/test/parallel/test-http2-util-headers-list.js b/test/parallel/test-http2-util-headers-list.js
index bc9455731c..a25336ee7a 100644
--- a/test/parallel/test-http2-util-headers-list.js
+++ b/test/parallel/test-http2-util-headers-list.js
@@ -245,7 +245,7 @@ const {
HTTP2_HEADER_TK,
HTTP2_HEADER_UPGRADE_INSECURE_REQUESTS,
HTTP2_HEADER_USER_AGENT,
- HTTP2_HEADER_X_CONTENT_TYPE_OPTIONS
+ HTTP2_HEADER_X_CONTENT_TYPE_OPTIONS,
].forEach((name) => {
const msg = `Header field "${name}" must only have a single value`;
assert.throws(() => mapToHeaders({ [name]: [1, 2, 3] }), {
@@ -283,7 +283,7 @@ const {
HTTP2_HEADER_VIA,
HTTP2_HEADER_WARNING,
HTTP2_HEADER_WWW_AUTHENTICATE,
- HTTP2_HEADER_X_FRAME_OPTIONS
+ HTTP2_HEADER_X_FRAME_OPTIONS,
].forEach((name) => {
assert(!(mapToHeaders({ [name]: [1, 2, 3] }) instanceof Error), name);
});
@@ -302,7 +302,7 @@ const {
'TE',
'Transfer-Encoding',
'Proxy-Connection',
- 'Keep-Alive'
+ 'Keep-Alive',
].forEach((name) => {
assert.throws(() => mapToHeaders({ [name]: 'abc' }), {
code: 'ERR_HTTP2_INVALID_CONNECTION_HEADERS',
@@ -349,7 +349,7 @@ assert.strictEqual(getAuthority({
'cookie', 'foo',
'set-cookie', 'sc1',
'age', '10',
- 'x-multi', 'first'
+ 'x-multi', 'first',
];
const headers = toHeaderObject(rawHeaders);
assert.strictEqual(headers[':status'], 200);
@@ -370,7 +370,7 @@ assert.strictEqual(getAuthority({
'age', '10',
'age', '20',
'x-multi', 'first',
- 'x-multi', 'second'
+ 'x-multi', 'second',
];
const headers = toHeaderObject(rawHeaders);
assert.strictEqual(headers[':status'], 200);
diff --git a/test/parallel/test-http2-window-size.js b/test/parallel/test-http2-window-size.js
index adf4534d5b..b5940f2958 100644
--- a/test/parallel/test-http2-window-size.js
+++ b/test/parallel/test-http2-window-size.js
@@ -89,7 +89,7 @@ const initialWindowSizeList = [
(1 << 8) - 1,
1 << 8,
1 << 17,
- undefined // Use default window size which is (1 << 16) - 1
+ undefined, // Use default window size which is (1 << 16) - 1
];
// Call `run` on each element in the cartesian product of buffersList and
diff --git a/test/parallel/test-https-agent-session-reuse.js b/test/parallel/test-https-agent-session-reuse.js
index 0717a3f816..485f4b1ca3 100644
--- a/test/parallel/test-https-agent-session-reuse.js
+++ b/test/parallel/test-https-agent-session-reuse.js
@@ -90,7 +90,7 @@ const server = https.createServer(options, function(req, res) {
servername: 'agent1',
ca: ca,
port: this.address().port
- }
+ },
];
function request() {
diff --git a/test/parallel/test-https-max-headers-count.js b/test/parallel/test-https-max-headers-count.js
index 12aaaa9cd3..f8e4e64bfb 100644
--- a/test/parallel/test-https-max-headers-count.js
+++ b/test/parallel/test-https-max-headers-count.js
@@ -25,7 +25,7 @@ for (let i = 0; i < N; ++i) {
const maxAndExpected = [ // for server
[50, 50],
[1500, 102],
- [0, N + 2] // Host and Connection
+ [0, N + 2], // Host and Connection
];
let max = maxAndExpected[requests][0];
let expected = maxAndExpected[requests][1];
@@ -46,7 +46,7 @@ server.listen(0, common.mustCall(() => {
const maxAndExpected = [ // for client
[20, 20],
[1200, 103],
- [0, N + 3] // Connection, Date and Transfer-Encoding
+ [0, N + 3], // Connection, Date and Transfer-Encoding
];
const doRequest = common.mustCall(() => {
const max = maxAndExpected[responses][0];
diff --git a/test/parallel/test-https-options-boolean-check.js b/test/parallel/test-https-options-boolean-check.js
index 65a17f9f76..9740704e16 100644
--- a/test/parallel/test-https-options-boolean-check.js
+++ b/test/parallel/test-https-options-boolean-check.js
@@ -61,7 +61,7 @@ const caArrDataView = toDataView(caCert);
[[keyStr, keyStr2], false],
[false, [certStr, certStr2]],
[[{ pem: keyBuff }], false],
- [[{ pem: keyBuff }, { pem: keyBuff }], false]
+ [[{ pem: keyBuff }, { pem: keyBuff }], false],
].forEach(([key, cert]) => {
https.createServer({ key, cert });
});
@@ -80,7 +80,7 @@ const caArrDataView = toDataView(caCert);
[[keyBuff, true], [certBuff, certBuff2], 1],
[[true, keyStr2], [certStr, certStr2], 0],
[[true, false], [certBuff, certBuff2], 0],
- [true, [certBuff, certBuff2]]
+ [true, [certBuff, certBuff2]],
].forEach(([key, cert, index]) => {
const val = index === undefined ? key : key[index];
assert.throws(() => {
@@ -141,7 +141,7 @@ const caArrDataView = toDataView(caCert);
[keyBuff, certBuff, {}],
[keyBuff, certBuff, 1],
[keyBuff, certBuff, true],
- [keyBuff, certBuff, [caCert, true], 1]
+ [keyBuff, certBuff, [caCert, true], 1],
].forEach(([key, cert, ca, index]) => {
const val = index === undefined ? ca : ca[index];
assert.throws(() => {
diff --git a/test/parallel/test-inspect-async-hook-setup-at-inspect.js b/test/parallel/test-inspect-async-hook-setup-at-inspect.js
index b68617b5d5..2c75558285 100644
--- a/test/parallel/test-inspect-async-hook-setup-at-inspect.js
+++ b/test/parallel/test-inspect-async-hook-setup-at-inspect.js
@@ -30,7 +30,7 @@ async function setupTimeoutForStackTrace(session) {
await session.send([
{ 'method': 'Runtime.evaluate',
'params': { expression: 'setupTimeoutWithBreak()' } },
- { 'method': 'Debugger.resume' }
+ { 'method': 'Debugger.resume' },
]);
}
@@ -54,7 +54,7 @@ async function runTests() {
'params': { 'maxDepth': 10 } },
{ 'method': 'Debugger.setBlackboxPatterns',
'params': { 'patterns': [] } },
- { 'method': 'Runtime.runIfWaitingForDebugger' }
+ { 'method': 'Runtime.runIfWaitingForDebugger' },
]);
await waitForInitialSetup(session);
diff --git a/test/parallel/test-inspect-publish-uid.js b/test/parallel/test-inspect-publish-uid.js
index 2479a37a2d..32550ddb66 100644
--- a/test/parallel/test-inspect-publish-uid.js
+++ b/test/parallel/test-inspect-publish-uid.js
@@ -20,7 +20,7 @@ async function testArg(argValue) {
const nodeProcess = spawnSync(process.execPath, [
'--inspect=0',
`--inspect-publish-uid=${argValue}`,
- '-e', `(${scriptMain.toString()})(${hasHttp ? 200 : 404})`
+ '-e', `(${scriptMain.toString()})(${hasHttp ? 200 : 404})`,
]);
const hasWebSocketInStderr = checkStdError(
nodeProcess.stderr.toString('utf8'));
diff --git a/test/parallel/test-inspector-connect-main-thread.js b/test/parallel/test-inspector-connect-main-thread.js
index be34981cd0..86ff6866bc 100644
--- a/test/parallel/test-inspector-connect-main-thread.js
+++ b/test/parallel/test-inspector-connect-main-thread.js
@@ -111,7 +111,7 @@ async function main() {
'Runtime.enable',
'Debugger.setBreakpointByUrl',
'Debugger.evaluateOnCallFrame',
- 'Debugger.resume'
+ 'Debugger.resume',
]);
}
diff --git a/test/parallel/test-inspector-esm.js b/test/parallel/test-inspector-esm.js
index da3bd17e33..590432ad9a 100644
--- a/test/parallel/test-inspector-esm.js
+++ b/test/parallel/test-inspector-esm.js
@@ -33,7 +33,7 @@ async function testBreakpointOnStart(session) {
'params': { 'interval': 100 } },
{ 'method': 'Debugger.setBlackboxPatterns',
'params': { 'patterns': [] } },
- { 'method': 'Runtime.runIfWaitingForDebugger' }
+ { 'method': 'Runtime.runIfWaitingForDebugger' },
];
await session.send(commands);
diff --git a/test/parallel/test-inspector-multisession-ws.js b/test/parallel/test-inspector-multisession-ws.js
index 7981eef0d3..1caae767ec 100644
--- a/test/parallel/test-inspector-multisession-ws.js
+++ b/test/parallel/test-inspector-multisession-ws.js
@@ -37,7 +37,7 @@ async function setupSession(node) {
'params': { 'interval': 100 } },
{ 'method': 'Debugger.setBlackboxPatterns',
'params': { 'patterns': [] } },
- { 'method': 'Runtime.runIfWaitingForDebugger' }
+ { 'method': 'Runtime.runIfWaitingForDebugger' },
]);
return session;
}
@@ -56,7 +56,7 @@ async function testSuspend(sessionA, sessionB) {
sessionA.send({ 'method': 'Debugger.pause' });
return Promise.all([
sessionA.waitForNotification('Debugger.paused', 'SessionA paused'),
- sessionB.waitForNotification('Debugger.paused', 'SessionB paused')
+ sessionB.waitForNotification('Debugger.paused', 'SessionB paused'),
]);
}
diff --git a/test/parallel/test-internal-module-require.js b/test/parallel/test-internal-module-require.js
index 5b20a83393..c6e2057d3d 100644
--- a/test/parallel/test-internal-module-require.js
+++ b/test/parallel/test-internal-module-require.js
@@ -70,7 +70,7 @@ const expectedPublicModules = new Set([
'v8',
'vm',
'worker_threads',
- 'zlib'
+ 'zlib',
]);
if (process.argv[2] === 'child') {
diff --git a/test/parallel/test-internal-util-decorate-error-stack.js b/test/parallel/test-internal-util-decorate-error-stack.js
index b12d50bee7..b125a29741 100644
--- a/test/parallel/test-internal-util-decorate-error-stack.js
+++ b/test/parallel/test-internal-util-decorate-error-stack.js
@@ -56,7 +56,7 @@ checkStack(err.stack);
// Verify that the stack is only decorated once for uncaught exceptions.
const args = [
'-e',
- `require('${badSyntaxPath}')`
+ `require('${badSyntaxPath}')`,
];
const result = spawnSync(process.argv[0], args, { encoding: 'utf8' });
checkStack(result.stderr);
diff --git a/test/parallel/test-internal-util-normalizeencoding.js b/test/parallel/test-internal-util-normalizeencoding.js
index af567cbcf5..167880d661 100644
--- a/test/parallel/test-internal-util-normalizeencoding.js
+++ b/test/parallel/test-internal-util-normalizeencoding.js
@@ -46,7 +46,7 @@ const tests = [
[NaN, undefined],
[0, undefined],
[[], undefined],
- [{}, undefined]
+ [{}, undefined],
];
tests.forEach((e, i) => {
diff --git a/test/parallel/test-internal-validators-validateport.js b/test/parallel/test-internal-validators-validateport.js
index ea9c3a7b58..a4c92b8dbc 100644
--- a/test/parallel/test-internal-validators-validateport.js
+++ b/test/parallel/test-internal-validators-validateport.js
@@ -17,7 +17,7 @@ for (let n = 0; n <= 0xFFFF; n++) {
-1, 'a', {}, [], false, true,
0xFFFF + 1, Infinity, -Infinity, NaN,
undefined, null, '', ' ', 1.1, '0x',
- '-0x1', '-0o1', '-0b1', '0o', '0b'
+ '-0x1', '-0o1', '-0b1', '0o', '0b',
].forEach((i) => assert.throws(() => validatePort(i), {
code: 'ERR_SOCKET_BAD_PORT'
}));
diff --git a/test/parallel/test-kill-segfault-freebsd.js b/test/parallel/test-kill-segfault-freebsd.js
index 8532f11c86..e17b00741b 100644
--- a/test/parallel/test-kill-segfault-freebsd.js
+++ b/test/parallel/test-kill-segfault-freebsd.js
@@ -11,7 +11,7 @@ const child_process = require('child_process');
// NOTE: Was crashing on FreeBSD
const cp = child_process.spawn(process.execPath, [
'-e',
- 'process.kill(process.pid, "SIGINT")'
+ 'process.kill(process.pid, "SIGINT")',
]);
cp.on('exit', function(code) {
diff --git a/test/parallel/test-macos-app-sandbox.js b/test/parallel/test-macos-app-sandbox.js
index 53484834a3..396a35cd72 100644
--- a/test/parallel/test-macos-app-sandbox.js
+++ b/test/parallel/test-macos-app-sandbox.js
@@ -43,14 +43,14 @@ assert.strictEqual(
'--entitlements', fixtures.path(
'macos-app-sandbox', 'node_sandboxed.entitlements'),
'--force', '-s', '-',
- appBundlePath
+ appBundlePath,
]).status,
0);
// Sandboxed app shouldn't be able to read the home dir
assert.notStrictEqual(
child_process.spawnSync(appExecutablePath, [
- '-e', 'fs.readdirSync(process.argv[1])', os.homedir()
+ '-e', 'fs.readdirSync(process.argv[1])', os.homedir(),
]).status,
0);
diff --git a/test/parallel/test-microtask-queue-integration.js b/test/parallel/test-microtask-queue-integration.js
index 57c384f8ba..69d55253a2 100644
--- a/test/parallel/test-microtask-queue-integration.js
+++ b/test/parallel/test-microtask-queue-integration.js
@@ -26,7 +26,7 @@ const assert = require('assert');
const implementations = [
function(fn) {
Promise.resolve().then(fn);
- }
+ },
];
let expected = 0;
diff --git a/test/parallel/test-module-circular-dependency-warning.js b/test/parallel/test-module-circular-dependency-warning.js
index 6e2924c45e..35ec16762b 100644
--- a/test/parallel/test-module-circular-dependency-warning.js
+++ b/test/parallel/test-module-circular-dependency-warning.js
@@ -11,7 +11,7 @@ common.expectWarning({
["Accessing non-existent property 'Symbol(someSymbol)' " +
'of module exports inside circular dependency'],
["Accessing non-existent property 'missingPropModuleExportsB' " +
- 'of module exports inside circular dependency']
+ 'of module exports inside circular dependency'],
]
});
const required = require(fixtures.path('cycles', 'warning-a.js'));
diff --git a/test/parallel/test-module-nodemodulepaths.js b/test/parallel/test-module-nodemodulepaths.js
index c79d2e6e72..1e355882e0 100644
--- a/test/parallel/test-module-nodemodulepaths.js
+++ b/test/parallel/test-module-nodemodulepaths.js
@@ -39,7 +39,7 @@ const cases = {
'C:\\Users\\hefangshi\\AppData\\node_modules',
'C:\\Users\\hefangshi\\node_modules',
'C:\\Users\\node_modules',
- 'C:\\node_modules'
+ 'C:\\node_modules',
]
}, {
file: 'C:\\Users\\Rocko Artischocko\\node_stuff\\foo',
@@ -48,7 +48,7 @@ const cases = {
'C:\\Users\\Rocko Artischocko\\node_stuff\\node_modules',
'C:\\Users\\Rocko Artischocko\\node_modules',
'C:\\Users\\node_modules',
- 'C:\\node_modules'
+ 'C:\\node_modules',
]
}, {
file: 'C:\\Users\\Rocko Artischocko\\node_stuff\\foo_node_modules',
@@ -58,17 +58,17 @@ Artischocko\\node_stuff\\foo_node_modules\\node_modules',
'C:\\Users\\Rocko Artischocko\\node_stuff\\node_modules',
'C:\\Users\\Rocko Artischocko\\node_modules',
'C:\\Users\\node_modules',
- 'C:\\node_modules'
+ 'C:\\node_modules',
]
}, {
file: 'C:\\node_modules',
expect: [
- 'C:\\node_modules'
+ 'C:\\node_modules',
]
}, {
file: 'C:\\',
expect: [
- 'C:\\node_modules'
+ 'C:\\node_modules',
]
}],
'POSIX': [{
@@ -83,7 +83,7 @@ node-gyp/node_modules/glob/node_modules',
'/usr/lib/node_modules/npm/node_modules',
'/usr/lib/node_modules',
'/usr/node_modules',
- '/node_modules'
+ '/node_modules',
]
}, {
file: '/usr/test/lib/node_modules/npm/foo',
@@ -93,7 +93,7 @@ node-gyp/node_modules/glob/node_modules',
'/usr/test/lib/node_modules',
'/usr/test/node_modules',
'/usr/node_modules',
- '/node_modules'
+ '/node_modules',
]
}, {
file: '/usr/test/lib/node_modules/npm/foo_node_modules',
@@ -103,17 +103,17 @@ node-gyp/node_modules/glob/node_modules',
'/usr/test/lib/node_modules',
'/usr/test/node_modules',
'/usr/node_modules',
- '/node_modules'
+ '/node_modules',
]
}, {
file: '/node_modules',
expect: [
- '/node_modules'
+ '/node_modules',
]
}, {
file: '/',
expect: [
- '/node_modules'
+ '/node_modules',
]
}]
};
diff --git a/test/parallel/test-net-connect-options-fd.js b/test/parallel/test-net-connect-options-fd.js
index 62e1414421..e9b35c0bfe 100644
--- a/test/parallel/test-net-connect-options-fd.js
+++ b/test/parallel/test-net-connect-options-fd.js
@@ -25,7 +25,7 @@ function testClients(getSocketOpt, getConnectOpt, getConnectCb) {
.on('connect', getConnectCb(3)),
new net.Socket(getSocketOpt(4)).connect(getConnectOpt(4), getConnectCb(4)),
new net.Socket(getSocketOpt(5)).connect(getConnectOpt(5))
- .on('connect', getConnectCb(5))
+ .on('connect', getConnectCb(5)),
];
}
diff --git a/test/parallel/test-net-connect-options-port.js b/test/parallel/test-net-connect-options-port.js
index 74e78240ab..d9f310afc7 100644
--- a/test/parallel/test-net-connect-options-port.js
+++ b/test/parallel/test-net-connect-options-port.js
@@ -128,7 +128,7 @@ function doConnect(args, getCb) {
return socket.connect.apply(socket, args)
.on('connect', getCb())
.resume();
- }
+ },
];
}
diff --git a/test/parallel/test-net-isipv4.js b/test/parallel/test-net-isipv4.js
index ec04505ced..8f5c30569c 100644
--- a/test/parallel/test-net-isipv4.js
+++ b/test/parallel/test-net-isipv4.js
@@ -19,7 +19,7 @@ const v4 = [
'192.0.2.235',
'99.198.122.146',
'46.51.197.88',
- '173.194.34.134'
+ '173.194.34.134',
];
const v4not = [
@@ -34,7 +34,7 @@ const v4not = [
'1000.2.3.4',
'999.2.3.4',
'0000000192.168.0.200',
- '192.168.0.2000000000'
+ '192.168.0.2000000000',
];
v4.forEach((ip) => {
diff --git a/test/parallel/test-net-isipv6.js b/test/parallel/test-net-isipv6.js
index 7ba379c3bd..855f17a076 100644
--- a/test/parallel/test-net-isipv6.js
+++ b/test/parallel/test-net-isipv6.js
@@ -131,7 +131,7 @@ const v6 = [
'a:0:0:0:a:0:0:0',
'a:0:0:0:0:0:0:0',
'fe80::7:8%eth0',
- 'fe80::7:8%1'
+ 'fe80::7:8%1',
];
const v6not = [
@@ -232,7 +232,7 @@ const v6not = [
'::ffff:257.1.2.3',
'::ffff:12345678901234567890.1.26',
'2001:0000:1234:0000:0000:C1C0:ABCD:0876 0',
- '02001:0000:1234:0000:0000:C1C0:ABCD:0876'
+ '02001:0000:1234:0000:0000:C1C0:ABCD:0876',
];
v6.forEach((ip) => {
diff --git a/test/parallel/test-net-server-listen-options.js b/test/parallel/test-net-server-listen-options.js
index 336485a3cb..7e306af8ab 100644
--- a/test/parallel/test-net-server-listen-options.js
+++ b/test/parallel/test-net-server-listen-options.js
@@ -20,7 +20,7 @@ function close() { this.close(); }
// Test listen(port, cb) and listen({ port }, cb) combinations
const listenOnPort = [
(port, cb) => net.createServer().listen({ port }, cb),
- (port, cb) => net.createServer().listen(port, cb)
+ (port, cb) => net.createServer().listen(port, cb),
];
{
diff --git a/test/parallel/test-net-socket-timeout.js b/test/parallel/test-net-socket-timeout.js
index e01304afe5..209359fda6 100644
--- a/test/parallel/test-net-socket-timeout.js
+++ b/test/parallel/test-net-socket-timeout.js
@@ -28,12 +28,12 @@ const { inspect } = require('util');
// Verify that invalid delays throw
const s = new net.Socket();
const nonNumericDelays = [
- '100', true, false, undefined, null, '', {}, () => {}, []
+ '100', true, false, undefined, null, '', {}, () => {}, [],
];
const badRangeDelays = [-0.001, -1, -Infinity, Infinity, NaN];
const validDelays = [0, 0.001, 1, 1e6];
const invalidCallbacks = [
- 1, '100', true, false, null, {}, [], Symbol('test')
+ 1, '100', true, false, null, {}, [], Symbol('test'),
];
diff --git a/test/parallel/test-net-write-arguments.js b/test/parallel/test-net-write-arguments.js
index 5495884743..289c3c0f36 100644
--- a/test/parallel/test-net-write-arguments.js
+++ b/test/parallel/test-net-write-arguments.js
@@ -23,7 +23,7 @@ assert.throws(() => {
+Infinity,
-Infinity,
[],
- {}
+ {},
].forEach((value) => {
const socket = net.Stream({ highWaterMark: 0 });
// We need to check the callback since 'error' will only
diff --git a/test/parallel/test-os-process-priority.js b/test/parallel/test-os-process-priority.js
index d9adac58bf..c6fdbff9e5 100644
--- a/test/parallel/test-os-process-priority.js
+++ b/test/parallel/test-os-process-priority.js
@@ -73,7 +73,7 @@ assert.strictEqual(typeof PRIORITY_HIGHEST, 'number');
3.14,
2 ** 32,
PRIORITY_HIGHEST - 1,
- PRIORITY_LOW + 1
+ PRIORITY_LOW + 1,
].forEach((priority) => {
assert.throws(() => {
os.setPriority(0, priority);
diff --git a/test/parallel/test-path-join.js b/test/parallel/test-path-join.js
index 6243d97ce8..d6d1839996 100644
--- a/test/parallel/test-path-join.js
+++ b/test/parallel/test-path-join.js
@@ -55,9 +55,9 @@ const joinTests = [
[['/', '//foo'], '/foo'],
[['/', '', '/foo'], '/foo'],
[['', '/', 'foo'], '/foo'],
- [['', '/', '/foo'], '/foo']
- ]
- ]
+ [['', '/', '/foo'], '/foo'],
+ ],
+ ],
];
// Windows-specific join tests
@@ -109,9 +109,9 @@ joinTests.push([
[['c:.', '/'], 'c:.\\'],
[['c:.', 'file'], 'c:file'],
[['c:', '/'], 'c:\\'],
- [['c:', 'file'], 'c:\\file']
+ [['c:', 'file'], 'c:\\file'],
]
- )
+ ),
]);
joinTests.forEach((test) => {
if (!Array.isArray(test[0]))
diff --git a/test/parallel/test-path-parse-format.js b/test/parallel/test-path-parse-format.js
index cd1e84eae0..e60a0cedae 100644
--- a/test/parallel/test-path-parse-format.js
+++ b/test/parallel/test-path-parse-format.js
@@ -47,7 +47,7 @@ const winPaths = [
['\\\\server two\\shared folder\\file path.zip',
'\\\\server two\\shared folder\\'],
['\\\\teela\\admin$\\system32', '\\\\teela\\admin$\\'],
- ['\\\\?\\UNC\\server\\share', '\\\\?\\UNC\\']
+ ['\\\\?\\UNC\\server\\share', '\\\\?\\UNC\\'],
];
const winSpecialCaseParseTests = [
@@ -62,7 +62,7 @@ const winSpecialCaseFormatTests = [
[{ name: 'index', ext: '.html' }, 'index.html'],
[{ dir: 'some\\dir', name: 'index', ext: '.html' }, 'some\\dir\\index.html'],
[{ root: 'C:\\', name: 'index', ext: '.html' }, 'C:\\index.html'],
- [{}, '']
+ [{}, ''],
];
const unixPaths = [
@@ -86,7 +86,7 @@ const unixPaths = [
['/.', '/'],
['/.foo', '/'],
['/.foo.bar', '/'],
- ['/foo/bar.baz', '/']
+ ['/foo/bar.baz', '/'],
];
const unixSpecialCaseFormatTests = [
@@ -96,7 +96,7 @@ const unixSpecialCaseFormatTests = [
[{ name: 'index', ext: '.html' }, 'index.html'],
[{ dir: 'some/dir', name: 'index', ext: '.html' }, 'some/dir/index.html'],
[{ root: '/', name: 'index', ext: '.html' }, '/index.html'],
- [{}, '']
+ [{}, ''],
];
const errors = [
@@ -132,9 +132,9 @@ const trailingTests = [
dir: 'D:\\foo\\\\',
base: 'bar.baz',
ext: '.baz',
- name: 'bar' }
- ]
- ]
+ name: 'bar' },
+ ],
+ ],
],
[ path.posix.parse,
[['./', { root: '', dir: '', base: '.', ext: '', name: '.' }],
@@ -142,10 +142,10 @@ const trailingTests = [
['///', { root: '/', dir: '/', base: '', ext: '', name: '' }],
['/foo///', { root: '/', dir: '/', base: 'foo', ext: '', name: 'foo' }],
['/foo///bar.baz',
- { root: '/', dir: '/foo//', base: 'bar.baz', ext: '.baz', name: 'bar' }
- ]
- ]
- ]
+ { root: '/', dir: '/foo//', base: 'bar.baz', ext: '.baz', name: 'bar' },
+ ],
+ ],
+ ],
];
const failures = [];
trailingTests.forEach((test) => {
diff --git a/test/parallel/test-path-relative.js b/test/parallel/test-path-relative.js
index 72f862b6df..f6a9f5662a 100644
--- a/test/parallel/test-path-relative.js
+++ b/test/parallel/test-path-relative.js
@@ -31,8 +31,8 @@ const relativeTests = [
['\\\\foo\\baz-quux', '\\\\foo\\baz', '..\\baz'],
['\\\\foo\\baz', '\\\\foo\\baz-quux', '..\\baz-quux'],
['C:\\baz', '\\\\foo\\bar\\baz', '\\\\foo\\bar\\baz'],
- ['\\\\foo\\bar\\baz', 'C:\\baz', 'C:\\baz']
- ]
+ ['\\\\foo\\bar\\baz', 'C:\\baz', 'C:\\baz'],
+ ],
],
[ path.posix.relative,
// Arguments result
@@ -48,9 +48,9 @@ const relativeTests = [
['/foo/bar/baz', '/foo/bar/baz-quux', '../baz-quux'],
['/baz-quux', '/baz', '../baz'],
['/baz', '/baz-quux', '../baz-quux'],
- ['/page1/page2/foo', '/', '../../..']
- ]
- ]
+ ['/page1/page2/foo', '/', '../../..'],
+ ],
+ ],
];
relativeTests.forEach((test) => {
const relative = test[0];
diff --git a/test/parallel/test-path-resolve.js b/test/parallel/test-path-resolve.js
index ed3c7c4c5a..8bf8001ea2 100644
--- a/test/parallel/test-path-resolve.js
+++ b/test/parallel/test-path-resolve.js
@@ -24,8 +24,8 @@ const resolveTests = [
[['c:/', '//server//share'], '\\\\server\\share\\'],
[['c:/', '///some//dir'], 'c:\\some\\dir'],
[['C:\\foo\\tmp.3\\', '..\\tmp.3\\cycles\\root.js'],
- 'C:\\foo\\tmp.3\\cycles\\root.js']
- ]
+ 'C:\\foo\\tmp.3\\cycles\\root.js'],
+ ],
],
[ path.posix.resolve,
// Arguments result
@@ -34,9 +34,9 @@ const resolveTests = [
[['a/b/c/', '../../..'], process.cwd()],
[['.'], process.cwd()],
[['/some/dir', '.', '/absolute/'], '/absolute'],
- [['/foo/tmp.3/', '../tmp.3/cycles/root.js'], '/foo/tmp.3/cycles/root.js']
- ]
- ]
+ [['/foo/tmp.3/', '../tmp.3/cycles/root.js'], '/foo/tmp.3/cycles/root.js'],
+ ],
+ ],
];
resolveTests.forEach((test) => {
const resolve = test[0];
diff --git a/test/parallel/test-performance-gc.js b/test/parallel/test-performance-gc.js
index 2a489fb679..1561bc5fb7 100644
--- a/test/parallel/test-performance-gc.js
+++ b/test/parallel/test-performance-gc.js
@@ -20,7 +20,7 @@ const kinds = [
NODE_PERFORMANCE_GC_MAJOR,
NODE_PERFORMANCE_GC_MINOR,
NODE_PERFORMANCE_GC_INCREMENTAL,
- NODE_PERFORMANCE_GC_WEAKCB
+ NODE_PERFORMANCE_GC_WEAKCB,
];
// Adding an observer should force at least one gc to appear
diff --git a/test/parallel/test-policy-parse-integrity.js b/test/parallel/test-policy-parse-integrity.js
index 3a31d0d57f..7c48eeb014 100644
--- a/test/parallel/test-policy-parse-integrity.js
+++ b/test/parallel/test-policy-parse-integrity.js
@@ -67,7 +67,7 @@ function test({ shouldFail, integrity, manifest = {} }) {
const { status } = spawnSync(process.execPath, [
'--experimental-policy',
policyFilepath,
- depFilepath
+ depFilepath,
]);
if (shouldFail) {
assert.notStrictEqual(status, 0);
diff --git a/test/parallel/test-policy-scopes-dependencies.js b/test/parallel/test-policy-scopes-dependencies.js
index a5a9302ac6..53c4488614 100644
--- a/test/parallel/test-policy-scopes-dependencies.js
+++ b/test/parallel/test-policy-scopes-dependencies.js
@@ -19,7 +19,7 @@ const assert = require('assert');
'file:///root/dir1',
'file:///root/dir1/',
'file:///root/dir1/dir2',
- 'file:///root/dir1/dir2/'
+ 'file:///root/dir1/dir2/',
];
{
diff --git a/test/parallel/test-policy-scopes-integrity.js b/test/parallel/test-policy-scopes-integrity.js
index 8c91cea142..16d9eb04eb 100644
--- a/test/parallel/test-policy-scopes-integrity.js
+++ b/test/parallel/test-policy-scopes-integrity.js
@@ -19,7 +19,7 @@ const assert = require('assert');
'file:///root/dir1',
'file:///root/dir1/',
'file:///root/dir1/dir2',
- 'file:///root/dir1/dir2/'
+ 'file:///root/dir1/dir2/',
];
{
diff --git a/test/parallel/test-preload.js b/test/parallel/test-preload.js
index df83d74e23..4636a46007 100644
--- a/test/parallel/test-preload.js
+++ b/test/parallel/test-preload.js
@@ -135,7 +135,7 @@ replProc.on('close', function(code) {
assert.strictEqual(code, 0);
const output = [
'A',
- '> '
+ '> ',
];
assert.ok(replStdout.startsWith(output[0]));
assert.ok(replStdout.endsWith(output[1]));
diff --git a/test/parallel/test-process-cpuUsage.js b/test/parallel/test-process-cpuUsage.js
index ecff499fd7..f1580d5f09 100644
--- a/test/parallel/test-process-cpuUsage.js
+++ b/test/parallel/test-process-cpuUsage.js
@@ -62,7 +62,7 @@ assert.throws(
[
{ user: 3, system: 'b' },
- { user: 3, system: null }
+ { user: 3, system: null },
].forEach((value) => {
assert.throws(
() => process.cpuUsage(value),
@@ -78,7 +78,7 @@ assert.throws(
// Check invalid values.
[
{ user: -1, system: 2 },
- { user: Number.POSITIVE_INFINITY, system: 4 }
+ { user: Number.POSITIVE_INFINITY, system: 4 },
].forEach((value) => {
assert.throws(
() => process.cpuUsage(value),
@@ -93,7 +93,7 @@ assert.throws(
[
{ user: 3, system: -2 },
- { user: 5, system: Number.NEGATIVE_INFINITY }
+ { user: 5, system: Number.NEGATIVE_INFINITY },
].forEach((value) => {
assert.throws(
() => process.cpuUsage(value),
diff --git a/test/parallel/test-process-emit-warning-from-native.js b/test/parallel/test-process-emit-warning-from-native.js
index ee7e731935..80b1e71a08 100644
--- a/test/parallel/test-process-emit-warning-from-native.js
+++ b/test/parallel/test-process-emit-warning-from-native.js
@@ -13,10 +13,10 @@ const key = '0123456789';
{
common.expectWarning({
DeprecationWarning: [
- ['crypto.createCipher is deprecated.', 'DEP0106']
+ ['crypto.createCipher is deprecated.', 'DEP0106'],
],
Warning: [
- ['Use Cipheriv for counter mode of aes-256-gcm']
+ ['Use Cipheriv for counter mode of aes-256-gcm'],
]
});
diff --git a/test/parallel/test-process-emitwarning.js b/test/parallel/test-process-emitwarning.js
index de0861140d..1bfac40ecb 100644
--- a/test/parallel/test-process-emitwarning.js
+++ b/test/parallel/test-process-emitwarning.js
@@ -42,7 +42,7 @@ class CustomWarning extends Error {
[testMsg, { type: testType, code: testCode, detail: true }],
[testMsg, { type: testType, code: testCode, detail: [] }],
[testMsg, { type: testType, code: testCode, detail: null }],
- [testMsg, { type: testType, code: testCode, detail: 1 }]
+ [testMsg, { type: testType, code: testCode, detail: 1 }],
].forEach((args) => {
process.emitWarning(...args);
});
@@ -72,7 +72,7 @@ process.emitWarning(warningThrowToString);
['', '', []],
[],
[undefined, 'foo', 'bar'],
- [undefined]
+ [undefined],
].forEach((args) => {
assert.throws(
() => process.emitWarning(...args),
diff --git a/test/parallel/test-process-env-allowed-flags.js b/test/parallel/test-process-env-allowed-flags.js
index 66be07b8b8..1d50e02d7a 100644
--- a/test/parallel/test-process-env-allowed-flags.js
+++ b/test/parallel/test-process-env-allowed-flags.js
@@ -28,7 +28,7 @@ const assert = require('assert');
'--r',
'-R',
'---inspect-brk',
- '--cheeseburgers'
+ '--cheeseburgers',
];
goodFlags.forEach((flag) => {
diff --git a/test/parallel/test-process-versions.js b/test/parallel/test-process-versions.js
index 464a8a4ece..56e3dc67e6 100644
--- a/test/parallel/test-process-versions.js
+++ b/test/parallel/test-process-versions.js
@@ -12,7 +12,7 @@ const expected_keys = [
'zlib',
'nghttp2',
'napi',
- 'llhttp'
+ 'llhttp',
];
if (common.hasCrypto) {
diff --git a/test/parallel/test-process-wrap.js b/test/parallel/test-process-wrap.js
index ef9075e915..997e3e4390 100644
--- a/test/parallel/test-process-wrap.js
+++ b/test/parallel/test-process-wrap.js
@@ -60,7 +60,7 @@ p.spawn({
stdio: [
{ type: 'ignore' },
{ type: 'pipe', handle: pipe },
- { type: 'ignore' }
+ { type: 'ignore' },
]
});
@@ -74,7 +74,7 @@ assert.throws(function() {
stdio: [
{ type: 'ignore' },
{ type: 'pipe', handle: pipe },
- { type: 'ignore' }
+ { type: 'ignore' },
]
});
}, TypeError);
diff --git a/test/parallel/test-promise-swallowed-event.js b/test/parallel/test-promise-swallowed-event.js
index 144d732c20..e9b97ab19d 100644
--- a/test/parallel/test-promise-swallowed-event.js
+++ b/test/parallel/test-promise-swallowed-event.js
@@ -38,7 +38,7 @@ const expected = [
swallowedResolve2,
'reject',
p2,
- rejection2
+ rejection2,
];
let count = 0;
diff --git a/test/parallel/test-promises-unhandled-symbol-rejections.js b/test/parallel/test-promises-unhandled-symbol-rejections.js
index cfcce5b148..00da8885f1 100644
--- a/test/parallel/test-promises-unhandled-symbol-rejections.js
+++ b/test/parallel/test-promises-unhandled-symbol-rejections.js
@@ -18,7 +18,7 @@ const expectedPromiseWarning = ['Unhandled promise rejection. ' +
common.expectWarning({
UnhandledPromiseRejectionWarning: [
expectedValueWarning,
- expectedPromiseWarning
+ expectedPromiseWarning,
],
});
diff --git a/test/parallel/test-punycode.js b/test/parallel/test-punycode.js
index d7ad2ec21f..190c0b22b3 100644
--- a/test/parallel/test-punycode.js
+++ b/test/parallel/test-punycode.js
@@ -194,7 +194,7 @@ const tests = [
encoded: '-> $1.00 <--',
decoded: '\u002D\u003E\u0020\u0024\u0031\u002E\u0030\u0030\u0020\u003C' +
'\u002D'
- }
+ },
];
let errors = 0;
diff --git a/test/parallel/test-querystring.js b/test/parallel/test-querystring.js
index 7a001f6a02..105bcc56a9 100644
--- a/test/parallel/test-querystring.js
+++ b/test/parallel/test-querystring.js
@@ -107,7 +107,7 @@ const qsTestCases = [
['%20+&', '%20%20=', { ' ': '' }],
['=%20+&', '=%20%20', { '': ' ' }],
[null, '', {}],
- [undefined, '', {}]
+ [undefined, '', {}],
];
// [ wonkyQS, canonicalQS, obj ]
@@ -118,7 +118,7 @@ const qsColonTestCases = [
'foo:1%26bar%3A2;baz:quux',
{ 'foo': '1&bar:2', 'baz': 'quux' }],
['foo%3Abaz:bar', 'foo%3Abaz:bar', { 'foo:baz': 'bar' }],
- ['foo:baz:bar', 'foo:baz%3Abar', { 'foo': 'baz:bar' }]
+ ['foo:baz:bar', 'foo:baz%3Abar', { 'foo': 'baz:bar' }],
];
// [wonkyObj, qs, canonicalObj]
@@ -138,14 +138,14 @@ const qsWeirdObjects = [
[
{ f: new Boolean(false), t: new Boolean(true) },
'f=&t=',
- { 'f': '', 't': '' }
+ { 'f': '', 't': '' },
],
[{ f: false, t: true }, 'f=false&t=true', { 'f': 'false', 't': 'true' }],
[{ n: null }, 'n=', { 'n': '' }],
[{ nan: NaN }, 'nan=', { 'nan': '' }],
[{ inf: Infinity }, 'inf=', { 'inf': '' }],
[{ a: [], b: [] }, '', {}],
- [{ a: 1, b: [] }, 'a=1', { 'a': '1' }]
+ [{ a: 1, b: [] }, 'a=1', { 'a': '1' }],
];
// }}}
@@ -164,7 +164,7 @@ const qsNoMungeTestCases = [
['gragh=1&gragh=3&goo=2', { 'gragh': ['1', '3'], 'goo': '2' }],
['frappucino=muffin&goat%5B%5D=scone&pond=moose',
{ 'frappucino': 'muffin', 'goat[]': 'scone', 'pond': 'moose' }],
- ['trololol=yes&lololo=no', { 'trololol': 'yes', 'lololo': 'no' }]
+ ['trololol=yes&lololo=no', { 'trololol': 'yes', 'lololo': 'no' }],
];
const qsUnescapeTestCases = [
@@ -178,7 +178,7 @@ const qsUnescapeTestCases = [
' !"#$%&\'()*+,-./01234567'],
['%%2a', '%*'],
['%2sf%2a', '%2sf*'],
- ['%2%2af%2a', '%2*f*']
+ ['%2%2af%2a', '%2*f*'],
];
assert.strictEqual(qs.parse('id=918854443121279438895193').id,
@@ -232,13 +232,13 @@ qsNoMungeTestCases.forEach((testCase) => {
const f = qs.parse('a=b&q=x%3Dy%26y%3Dz');
check(f, createWithNoPrototype([
{ key: 'a', value: 'b' },
- { key: 'q', value: 'x=y&y=z' }
+ { key: 'q', value: 'x=y&y=z' },
]));
f.q = qs.parse(f.q);
const expectedInternal = createWithNoPrototype([
{ key: 'x', value: 'y' },
- { key: 'y', value: 'z' }
+ { key: 'y', value: 'z' },
]);
check(f.q, expectedInternal);
}
@@ -248,12 +248,12 @@ qsNoMungeTestCases.forEach((testCase) => {
const f = qs.parse('a:b;q:x%3Ay%3By%3Az', ';', ':');
check(f, createWithNoPrototype([
{ key: 'a', value: 'b' },
- { key: 'q', value: 'x:y;y:z' }
+ { key: 'q', value: 'x:y;y:z' },
]));
f.q = qs.parse(f.q, ';', ':');
const expectedInternal = createWithNoPrototype([
{ key: 'x', value: 'y' },
- { key: 'y', value: 'z' }
+ { key: 'y', value: 'z' },
]);
check(f.q, expectedInternal);
}
diff --git a/test/parallel/test-readable-from.js b/test/parallel/test-readable-from.js
index aca8f5548a..24dee0dce2 100644
--- a/test/parallel/test-readable-from.js
+++ b/test/parallel/test-readable-from.js
@@ -48,7 +48,7 @@ async function toReadablePromises() {
const promises = [
Promise.resolve('a'),
Promise.resolve('b'),
- Promise.resolve('c')
+ Promise.resolve('c'),
];
const stream = Readable.from(promises);
diff --git a/test/parallel/test-readline-async-iterators-destroy.js b/test/parallel/test-readline-async-iterators-destroy.js
index 7c14a66706..8641b0a2ac 100644
--- a/test/parallel/test-readline-async-iterators-destroy.js
+++ b/test/parallel/test-readline-async-iterators-destroy.js
@@ -17,7 +17,7 @@ const testContents = [
'\n',
'line 1',
'line 1\nline 2 南越国是前203年至前111年存在于岭南地区的一个国家\nline 3\ntrailing',
- 'line 1\nline 2\nline 3 ends with newline\n'
+ 'line 1\nline 2\nline 3 ends with newline\n',
];
async function testSimpleDestroy() {
diff --git a/test/parallel/test-readline-async-iterators.js b/test/parallel/test-readline-async-iterators.js
index c3883e4f36..671d6ae17c 100644
--- a/test/parallel/test-readline-async-iterators.js
+++ b/test/parallel/test-readline-async-iterators.js
@@ -16,7 +16,7 @@ const testContents = [
'\n',
'line 1',
'line 1\nline 2 南越国是前203年至前111年存在于岭南地区的一个国家\nline 3\ntrailing',
- 'line 1\nline 2\nline 3 ends with newline\n'
+ 'line 1\nline 2\nline 3 ends with newline\n',
];
async function testSimple() {
diff --git a/test/parallel/test-readline-emit-keypress-events.js b/test/parallel/test-readline-emit-keypress-events.js
index 3b9aece465..8bb10d905c 100644
--- a/test/parallel/test-readline-emit-keypress-events.js
+++ b/test/parallel/test-readline-emit-keypress-events.js
@@ -24,5 +24,5 @@ assert.deepStrictEqual(sequence, ['f', 'o', 'o']);
assert.deepStrictEqual(keys, [
{ sequence: 'f', name: 'f', ctrl: false, meta: false, shift: false },
{ sequence: 'o', name: 'o', ctrl: false, meta: false, shift: false },
- { sequence: 'o', name: 'o', ctrl: false, meta: false, shift: false }
+ { sequence: 'o', name: 'o', ctrl: false, meta: false, shift: false },
]);
diff --git a/test/parallel/test-readline-interface-escapecodetimeout.js b/test/parallel/test-readline-interface-escapecodetimeout.js
index 11d518c073..a0c0e77cb8 100644
--- a/test/parallel/test-readline-interface-escapecodetimeout.js
+++ b/test/parallel/test-readline-interface-escapecodetimeout.js
@@ -29,7 +29,7 @@ class FakeInput extends EventEmitter {
null,
{},
NaN,
- '50'
+ '50',
].forEach((invalidInput) => {
assert.throws(() => {
const fi = new FakeInput();
diff --git a/test/parallel/test-readline-interface.js b/test/parallel/test-readline-interface.js
index 8afe40efab..afa9fd33d2 100644
--- a/test/parallel/test-readline-interface.js
+++ b/test/parallel/test-readline-interface.js
@@ -76,7 +76,7 @@ function assertCursorRowsAndCols(rli, rows, cols) {
50,
0,
100.5,
- 5000
+ 5000,
].forEach((crlfDelay) => {
const [rli] = getInterface({ crlfDelay });
assert.strictEqual(rli.crlfDelay, Math.max(crlfDelay || 100, 100));
@@ -536,7 +536,7 @@ function assertCursorRowsAndCols(rli, rows, cols) {
[
{ ctrl: true, name: 'w' },
{ ctrl: true, name: 'backspace' },
- { meta: true, name: 'backspace' }
+ { meta: true, name: 'backspace' },
].forEach((deleteWordLeftKey) => {
let [rli, fi] = getInterface({ terminal: true, prompt: '' });
fi.emit('data', 'the quick brown fox');
@@ -564,7 +564,7 @@ function assertCursorRowsAndCols(rli, rows, cols) {
[
{ ctrl: true, name: 'delete' },
{ meta: true, name: 'delete' },
- { meta: true, name: 'd' }
+ { meta: true, name: 'd' },
].forEach((deleteWordRightKey) => {
let [rli, fi] = getInterface({ terminal: true, prompt: '' });
fi.emit('data', 'the quick brown fox');
diff --git a/test/parallel/test-readline-keys.js b/test/parallel/test-readline-keys.js
index bdc93c148e..8ae0d680d5 100644
--- a/test/parallel/test-readline-keys.js
+++ b/test/parallel/test-readline-keys.js
@@ -332,15 +332,15 @@ addTest('\x1bOa\x1bOb\x1bOc\x1bOd\x1bOe', [
const runKeyIntervalTests = [
// Escape character
addKeyIntervalTest('\x1b', [
- { name: 'escape', sequence: '\x1b', meta: true }
+ { name: 'escape', sequence: '\x1b', meta: true },
]),
// Chain of escape characters.
addKeyIntervalTest('\x1b\x1b\x1b\x1b'.split(''), [
{ name: 'escape', sequence: '\x1b', meta: true },
{ name: 'escape', sequence: '\x1b', meta: true },
{ name: 'escape', sequence: '\x1b', meta: true },
- { name: 'escape', sequence: '\x1b', meta: true }
- ])
+ { name: 'escape', sequence: '\x1b', meta: true },
+ ]),
].reverse().reduce((acc, fn) => fn(acc), () => {});
// Run key interval tests one after another.
diff --git a/test/parallel/test-readline-reopen.js b/test/parallel/test-readline-reopen.js
index dead22d81a..fd305fee3e 100644
--- a/test/parallel/test-readline-reopen.js
+++ b/test/parallel/test-readline-reopen.js
@@ -23,7 +23,7 @@ rl1.on('line', common.mustCall(rl1OnLine));
// that it doesn’t get lost when closing the readline instance.
input.write(Buffer.concat([
Buffer.from('foo\n'),
- Buffer.from([ 0xe2 ]) // Exactly one third of a ☃ snowman.
+ Buffer.from([ 0xe2 ]), // Exactly one third of a ☃ snowman.
]));
function rl1OnLine(line) {
diff --git a/test/parallel/test-readline-tab-complete.js b/test/parallel/test-readline-tab-complete.js
index e887186340..7ccdef1164 100644
--- a/test/parallel/test-readline-tab-complete.js
+++ b/test/parallel/test-readline-tab-complete.js
@@ -15,7 +15,7 @@ common.skipIfDumbTerminal();
[
'あ',
'𐐷',
- '🐕'
+ '🐕',
].forEach((char) => {
[true, false].forEach((lineBreak) => {
const completer = (line) => [
@@ -24,7 +24,7 @@ common.skipIfDumbTerminal();
'',
`${char}${'a'.repeat(10)}`, `${char}${'b'.repeat(10)}`, char.repeat(11),
],
- line
+ line,
];
let output = '';
diff --git a/test/parallel/test-readline.js b/test/parallel/test-readline.js
index b336996cd2..77799fc14c 100644
--- a/test/parallel/test-readline.js
+++ b/test/parallel/test-readline.js
@@ -142,7 +142,7 @@ common.skipIfDumbTerminal();
'hop/zoo',
'/zoo',
'zoo',
- ''
+ '',
].forEach(function(expectedLine) {
rl.write.apply(rl, key.xterm.metad);
assert.strictEqual(rl.cursor, 0);
diff --git a/test/parallel/test-repl-domain.js b/test/parallel/test-repl-domain.js
index ce6da4bedb..462677d114 100644
--- a/test/parallel/test-repl-domain.js
+++ b/test/parallel/test-repl-domain.js
@@ -41,5 +41,5 @@ putIn.write = function(data) {
putIn.run([
'require("domain").create().on("error", function() { console.log("OK") })' +
- '.run(function() { throw new Error("threw") })'
+ '.run(function() { throw new Error("threw") })',
]);
diff --git a/test/parallel/test-repl-dynamic-import.js b/test/parallel/test-repl-dynamic-import.js
index 1f7a01575a..a043e31bf5 100644
--- a/test/parallel/test-repl-dynamic-import.js
+++ b/test/parallel/test-repl-dynamic-import.js
@@ -4,7 +4,7 @@ const assert = require('assert');
const child_process = require('child_process');
const child = child_process.spawn(process.execPath, [
'--interactive',
- '--expose-gc'
+ '--expose-gc',
], {
stdio: 'pipe'
});
diff --git a/test/parallel/test-repl-editor.js b/test/parallel/test-repl-editor.js
index 783d303b3a..e260f5e891 100644
--- a/test/parallel/test-repl-editor.js
+++ b/test/parallel/test-repl-editor.js
@@ -71,7 +71,7 @@ const tests = [
output: '',
checkTerminalCodes: false,
event: null,
- }
+ },
];
tests.forEach(run);
@@ -121,7 +121,7 @@ const codeAlignmentTests = [
input: ' let i = 1;\n let j = 2\n',
cursor: 2,
line: ' '
- }
+ },
];
codeAlignmentTests.forEach(testCodeAlignment);
diff --git a/test/parallel/test-repl-envvars.js b/test/parallel/test-repl-envvars.js
index 4fab77b7c0..96cc47dd16 100644
--- a/test/parallel/test-repl-envvars.js
+++ b/test/parallel/test-repl-envvars.js
@@ -32,7 +32,7 @@ const tests = [
{
env: { NODE_NO_READLINE: '0' },
expected: { terminal: true, useColors: true }
- }
+ },
];
function run(test) {
diff --git a/test/parallel/test-repl-history-navigation.js b/test/parallel/test-repl-history-navigation.js
index 4dd9c35022..044c788a16 100644
--- a/test/parallel/test-repl-history-navigation.js
+++ b/test/parallel/test-repl-history-navigation.js
@@ -116,7 +116,7 @@ const tests = [
'const foo = true', ENTER,
'555n + 111n', ENTER,
'5 + 5', ENTER,
- '55 - 13 === 42', ENTER
+ '55 - 13 === 42', ENTER,
],
expected: [],
clean: false
@@ -127,7 +127,7 @@ const tests = [
preview: false,
showEscapeCodes: true,
test: [
- '55', UP, UP, UP, UP, UP, UP, ENTER
+ '55', UP, UP, UP, UP, UP, UP, ENTER,
],
expected: [
'\x1B[1G', '\x1B[0J', prompt, '\x1B[3G',
@@ -150,7 +150,7 @@ const tests = [
'\r\n', '55\n',
'\x1B[1G', '\x1B[0J',
'> ', '\x1B[3G',
- '\r\n'
+ '\r\n',
],
clean: true
},
@@ -189,7 +189,7 @@ const tests = [
ENTER,
`${' '.repeat(236)} fun`,
ESCAPE,
- ENTER
+ ENTER,
],
expected: [],
clean: false
@@ -220,7 +220,7 @@ const tests = [
'2',
BACKSPACE,
'3',
- SIGINT
+ SIGINT,
],
// A = Cursor n up
// B = Cursor n down
@@ -315,7 +315,7 @@ const tests = [
'\r\n',
'\x1B[1G', '\x1B[0J',
'> ', '\x1B[3G',
- '\r\n'
+ '\r\n',
],
clean: true
},
@@ -343,7 +343,7 @@ const tests = [
LEFT,
ENTER,
UP,
- ENTER
+ ENTER,
],
// C = Cursor n forward
// D = Cursor n back
@@ -420,7 +420,7 @@ const tests = [
'n', '\r\n',
'\x1B[1G', '\x1B[0J',
'... ', '\x1B[5G',
- '\r\n'
+ '\r\n',
],
clean: true
},
@@ -430,7 +430,7 @@ const tests = [
skip: !process.features.inspector,
test: [
'util.inspect.replDefaults.showHidden',
- ENTER
+ ENTER,
],
expected: [],
clean: false
@@ -447,7 +447,7 @@ const tests = [
' = true',
ENTER,
'[ ]',
- ENTER
+ ENTER,
],
expected: [
prompt,
@@ -487,7 +487,7 @@ const tests = [
WAIT, // The second call is not awaited. It won't trigger the preview.
BACKSPACE,
's',
- BACKSPACE
+ BACKSPACE,
],
expected: [
prompt,
diff --git a/test/parallel/test-repl-inspect-defaults.js b/test/parallel/test-repl-inspect-defaults.js
index 9a033ce1f3..84536eb773 100644
--- a/test/parallel/test-repl-inspect-defaults.js
+++ b/test/parallel/test-repl-inspect-defaults.js
@@ -18,7 +18,7 @@ child.on('exit', common.mustCall(() => {
'[ 42, 23 ]',
'1',
'[ 42, ... 1 more item ]',
- ''
+ '',
]
);
}));
diff --git a/test/parallel/test-repl-inspector.js b/test/parallel/test-repl-inspector.js
index acec99208b..1fff9031d5 100644
--- a/test/parallel/test-repl-inspector.js
+++ b/test/parallel/test-repl-inspector.js
@@ -28,7 +28,7 @@ putIn.run([
'const session = new inspector.Session()',
'session.connect()',
'session.post("Runtime.evaluate", { expression: "1 + 1" }, console.log)',
- 'session.disconnect()'
+ 'session.disconnect()',
]);
assert(output.includes(
diff --git a/test/parallel/test-repl-persistent-history.js b/test/parallel/test-repl-persistent-history.js
index 705a7c7c23..b0cddf0a2b 100644
--- a/test/parallel/test-repl-persistent-history.js
+++ b/test/parallel/test-repl-persistent-history.js
@@ -98,7 +98,7 @@ const tests = [
expected: [
prompt,
'2', '1', '21\n', prompt, prompt,
- "'", '4', '2', "'", "'42'\n", prompt, prompt
+ "'", '4', '2', "'", "'42'\n", prompt, prompt,
],
clean: false
},
@@ -128,7 +128,7 @@ const tests = [
`${prompt}'you look fabulous today'`,
prompt,
`${prompt}'you look fabulous today'`,
- prompt
+ prompt,
]
},
{
@@ -169,7 +169,7 @@ const tests = [
env: {},
test: [UP],
expected: [prompt, homedirErr, prompt, replDisabled, prompt]
- }
+ },
];
const numtests = tests.length;
diff --git a/test/parallel/test-repl-preprocess-top-level-await.js b/test/parallel/test-repl-preprocess-top-level-await.js
index 2a173b7339..ed1fe90e43 100644
--- a/test/parallel/test-repl-preprocess-top-level-await.js
+++ b/test/parallel/test-repl-preprocess-top-level-await.js
@@ -60,7 +60,7 @@ const testCases = [
[ 'var a = await 1; let b = 2; const c = 3;',
'(async () => { void (a = await 1); void (b = 2); void (c = 3); })()' ],
[ 'let o = await 1, p',
- '(async () => { void ( (o = await 1), (p=undefined)) })()' ]
+ '(async () => { void ( (o = await 1), (p=undefined)) })()' ],
];
for (const [input, expected] of testCases) {
diff --git a/test/parallel/test-repl-pretty-custom-stack.js b/test/parallel/test-repl-pretty-custom-stack.js
index d04a394a2e..aef34f1b4f 100644
--- a/test/parallel/test-repl-pretty-custom-stack.js
+++ b/test/parallel/test-repl-pretty-custom-stack.js
@@ -68,7 +68,7 @@ const tests = [
{
command: '(function() { throw new Error(\'Whoops!\'); })()',
expected: 'Uncaught Error: Whoops!--->\nREPL5:*:*\n'
- }
+ },
];
tests.forEach(run);
diff --git a/test/parallel/test-repl-pretty-stack.js b/test/parallel/test-repl-pretty-stack.js
index 8ab3fef2aa..c785bf75a1 100644
--- a/test/parallel/test-repl-pretty-stack.js
+++ b/test/parallel/test-repl-pretty-stack.js
@@ -70,7 +70,7 @@ const tests = [
{
command: '(function() { throw new Error(\'Whoops!\'); })()',
expected: 'Uncaught Error: Whoops!\n at REPL7:*:*\n'
- }
+ },
];
tests.forEach(run);
diff --git a/test/parallel/test-repl-preview.js b/test/parallel/test-repl-preview.js
index b0159bfd64..620f41296e 100644
--- a/test/parallel/test-repl-preview.js
+++ b/test/parallel/test-repl-preview.js
@@ -77,7 +77,7 @@ async function tests(options) {
repl.inputStream.run([
'function foo(x) { return x; }',
'function koo() { console.log("abc"); }',
- 'a = undefined;'
+ 'a = undefined;',
]);
const testCases = [{
@@ -86,7 +86,7 @@ async function tests(options) {
preview: [
'foo',
'\x1B[90m[Function: foo]\x1B[39m\x1B[11G\x1B[1A\x1B[1B\x1B[2K\x1B[1A\r',
- '\x1B[36m[Function: foo]\x1B[39m'
+ '\x1B[36m[Function: foo]\x1B[39m',
]
}, {
input: 'koo',
@@ -98,7 +98,7 @@ async function tests(options) {
'\x1B[90m[Function: koo]\x1B[39m\x1B[10G\x1B[1A\x1B[1B\x1B[2K\x1B[1A' +
'\x1B[0Ko',
'\x1B[90m[Function: koo]\x1B[39m\x1B[11G\x1B[1A\x1B[1B\x1B[2K\x1B[1A\r',
- '\x1B[36m[Function: koo]\x1B[39m'
+ '\x1B[36m[Function: koo]\x1B[39m',
]
}, {
input: 'a',
@@ -112,7 +112,7 @@ async function tests(options) {
'\x1B[90m1\x1B[39m\x1B[22G\x1B[1A\x1B[1B\x1B[2K\x1B[1A ',
'\x1B[90m1\x1B[39m\x1B[23G\x1B[1A\x1B[1B\x1B[2K\x1B[1A=== 1',
'\x1B[90mtrue\x1B[39m\x1B[28G\x1B[1A\x1B[1B\x1B[2K\x1B[1A\r',
- '\x1B[33mtrue\x1B[39m'
+ '\x1B[33mtrue\x1B[39m',
]
}, {
input: "{ b: 1 }['b'] === 1;",
@@ -123,14 +123,14 @@ async function tests(options) {
'\x1B[90m1\x1B[39m\x1B[22G\x1B[1A\x1B[1B\x1B[2K\x1B[1A=== 1',
'\x1B[90mtrue\x1B[39m\x1B[27G\x1B[1A\x1B[1B\x1B[2K\x1B[1A;',
'\x1B[90mfalse\x1B[39m\x1B[28G\x1B[1A\x1B[1B\x1B[2K\x1B[1A\r',
- '\x1B[33mfalse\x1B[39m'
+ '\x1B[33mfalse\x1B[39m',
]
}, {
input: '{ a: true }',
noPreview: '{ a: \x1B[33mtrue\x1B[39m }',
preview: [
'{ a: tru\x1B[90me\x1B[39m\x1B[16G\x1B[0Ke }\r',
- '{ a: \x1B[33mtrue\x1B[39m }'
+ '{ a: \x1B[33mtrue\x1B[39m }',
]
}, {
input: '{ a: true };',
@@ -138,7 +138,7 @@ async function tests(options) {
preview: [
'{ a: tru\x1B[90me\x1B[39m\x1B[16G\x1B[0Ke };',
'\x1B[90mtrue\x1B[39m\x1B[20G\x1B[1A\x1B[1B\x1B[2K\x1B[1A\r',
- '\x1B[33mtrue\x1B[39m'
+ '\x1B[33mtrue\x1B[39m',
]
}, {
input: ' \t { a: true};',
@@ -147,7 +147,7 @@ async function tests(options) {
' { a: tru\x1B[90me\x1B[39m\x1B[18G\x1B[0Ke}',
'\x1B[90m{ a: true }\x1B[39m\x1B[20G\x1B[1A\x1B[1B\x1B[2K\x1B[1A;',
'\x1B[90mtrue\x1B[39m\x1B[21G\x1B[1A\x1B[1B\x1B[2K\x1B[1A\r',
- '\x1B[33mtrue\x1B[39m'
+ '\x1B[33mtrue\x1B[39m',
]
}, {
input: '1n + 2n',
@@ -156,7 +156,7 @@ async function tests(options) {
'1n + 2',
'\x1B[90mType[39m\x1B[14G\x1B[1A\x1B[1B\x1B[2K\x1B[1An',
'\x1B[90m3n\x1B[39m\x1B[15G\x1B[1A\x1B[1B\x1B[2K\x1B[1A\r',
- '\x1B[33m3n\x1B[39m'
+ '\x1B[33m3n\x1B[39m',
]
}, {
input: '{};1',
@@ -164,7 +164,7 @@ async function tests(options) {
preview: [
'{};1',
'\x1B[90m1\x1B[39m\x1B[12G\x1B[1A\x1B[1B\x1B[2K\x1B[1A\r',
- '\x1B[33m1\x1B[39m'
+ '\x1B[33m1\x1B[39m',
]
}];
diff --git a/test/parallel/test-repl-programmatic-history.js b/test/parallel/test-repl-programmatic-history.js
index 0eccea6552..e2ad2cc66f 100644
--- a/test/parallel/test-repl-programmatic-history.js
+++ b/test/parallel/test-repl-programmatic-history.js
@@ -98,7 +98,7 @@ const tests = [
// TODO(BridgeAR): The line is refreshed too many times. The double prompt
// is redundant and can be optimized away.
'2', '1', '21\n', prompt, prompt,
- "'", '4', '2', "'", "'42'\n", prompt, prompt
+ "'", '4', '2', "'", "'42'\n", prompt, prompt,
],
clean: false
},
@@ -112,7 +112,7 @@ const tests = [
prompt,
`${prompt}21`,
'21\n',
- prompt
+ prompt,
]
},
{
@@ -124,7 +124,7 @@ const tests = [
`${prompt}'you look fabulous today'`,
prompt,
`${prompt}'you look fabulous today'`,
- prompt
+ prompt,
]
},
{
@@ -165,7 +165,7 @@ const tests = [
env: {},
test: [UP],
expected: [prompt, homedirErr, prompt, replDisabled, prompt]
- }
+ },
];
const numtests = tests.length;
diff --git a/test/parallel/test-repl-reverse-search.js b/test/parallel/test-repl-reverse-search.js
index 5027bd7da4..5165dc2820 100644
--- a/test/parallel/test-repl-reverse-search.js
+++ b/test/parallel/test-repl-reverse-search.js
@@ -71,7 +71,7 @@ const tests = [
'ab = "aaaa"', ENTER,
'555 - 909', ENTER,
'{key : {key2 :[] }}', ENTER,
- 'Array(100).fill(1)', ENTER
+ 'Array(100).fill(1)', ENTER,
],
expected: [],
clean: false
@@ -99,7 +99,7 @@ const tests = [
SEARCH_BACKWARDS, // 15
SEARCH_FORWARDS,
ESCAPE, // 17
- ENTER
+ ENTER,
],
// A = Cursor n up
// B = Cursor n down
@@ -179,7 +179,7 @@ const tests = [
'\x1B[1G', '\x1B[0J',
prompt,
'\x1B[3G',
- '\r\n'
+ '\r\n',
],
clean: false
},
@@ -207,7 +207,7 @@ const tests = [
UP, // 15
DOWN,
SEARCH_FORWARDS, // 17
- '\n'
+ '\n',
],
expected: [
'\x1B[1G', '\x1B[0J',
@@ -262,10 +262,10 @@ const tests = [
'-1\n',
'\x1B[1G', '\x1B[0J',
prompt, '\x1B[3G',
- '\r\n'
+ '\r\n',
],
clean: false
- }
+ },
];
const numtests = tests.length;
diff --git a/test/parallel/test-repl-save-load.js b/test/parallel/test-repl-save-load.js
index 9807365a41..7fe535f643 100644
--- a/test/parallel/test-repl-save-load.js
+++ b/test/parallel/test-repl-save-load.js
@@ -46,7 +46,7 @@ testMe._domain.on('error', function(reason) {
const testFile = [
'let inner = (function() {',
' return {one:1};',
- '})()'
+ '})()',
];
const saveFileName = join(tmpdir.path, 'test.save.js');
@@ -121,7 +121,7 @@ putIn.run([`.save ${invalidFileName}`]);
const cmds = [
'function testSave() {',
'return "saved";',
- '}'
+ '}',
];
const putIn = new ArrayStream();
const replServer = repl.start({ terminal: true, stream: putIn });
diff --git a/test/parallel/test-repl-tab-complete.js b/test/parallel/test-repl-tab-complete.js
index 01eac9a0ee..da0ebfba9f 100644
--- a/test/parallel/test-repl-tab-complete.js
+++ b/test/parallel/test-repl-tab-complete.js
@@ -68,7 +68,7 @@ testMe._domain.on('error', assert.ifError);
// Tab Complete will not break in an object literal
putIn.run([
'var inner = {',
- 'one:1'
+ 'one:1',
]);
testMe.complete('inner.o', getNoResultsFunction());
@@ -101,7 +101,7 @@ putIn.run(['.clear']);
putIn.run([
'var inner = ( true ',
'?',
- '{one: 1} : '
+ '{one: 1} : ',
]);
testMe.complete('inner.o', getNoResultsFunction());
@@ -110,7 +110,7 @@ putIn.run(['.clear']);
// Tab Complete will return a simple local variable
putIn.run([
'var top = function() {',
- 'var inner = {one:1};'
+ 'var inner = {one:1};',
]);
testMe.complete('inner.o', getNoResultsFunction());
@@ -126,7 +126,7 @@ putIn.run([
'var top = function() {',
'var inner = {',
' one:1',
- '};'
+ '};',
]);
testMe.complete('inner.o', getNoResultsFunction());
@@ -138,7 +138,7 @@ putIn.run([
'var top = function(one, two) {',
'var inner = {',
' one:1',
- '};'
+ '};',
]);
testMe.complete('inner.o', getNoResultsFunction());
@@ -151,7 +151,7 @@ putIn.run([
'(function test () {',
'var inner = {',
' one:1',
- '};'
+ '};',
]);
testMe.complete('inner.o', getNoResultsFunction());
@@ -164,7 +164,7 @@ putIn.run([
' one, two) {',
'var inner = {',
' one:1',
- '};'
+ '};',
]);
testMe.complete('inner.o', getNoResultsFunction());
@@ -177,7 +177,7 @@ putIn.run([
'{',
'var inner = {',
' one:1',
- '};'
+ '};',
]);
testMe.complete('inner.o', getNoResultsFunction());
@@ -191,7 +191,7 @@ putIn.run([
'{',
'var inner = {',
' one:1',
- '};'
+ '};',
]);
testMe.complete('inner.o', getNoResultsFunction());
@@ -199,7 +199,7 @@ putIn.run(['.clear']);
// Make sure tab completion works on non-Objects
putIn.run([
- 'var str = "test";'
+ 'var str = "test";',
]);
testMe.complete('str.len', common.mustCall(function(error, data) {
assert.deepStrictEqual(data, [['str.length'], 'str.len']);
@@ -232,7 +232,7 @@ putIn.run([
'x.b = 2;',
'var y = Object.create(x);',
'y.a = 3;',
- 'y.c = 4;'
+ 'y.c = 4;',
]);
testMe.complete('y.', common.mustCall(function(error, data) {
assert.deepStrictEqual(data, [['y.b', '', 'y.a', 'y.c'], 'y.']);
@@ -368,7 +368,7 @@ testMe.complete("require\t( 'n", common.mustCall(function(error, data) {
putIn.run(['.clear']);
putIn.run([
- 'var custom = "test";'
+ 'var custom = "test";',
]);
testMe.complete('cus', common.mustCall(function(error, data) {
assert.deepStrictEqual(data, [['custom'], 'cus']);
@@ -379,7 +379,7 @@ testMe.complete('cus', common.mustCall(function(error, data) {
putIn.run(['.clear']);
putIn.run([
- 'var proxy = new Proxy({}, {ownKeys: () => { throw new Error(); }});'
+ 'var proxy = new Proxy({}, {ownKeys: () => { throw new Error(); }});',
]);
testMe.complete('proxy.', common.mustCall(function(error, data) {
@@ -515,7 +515,7 @@ testMe.complete('obj.', common.mustCall((error, data) => {
putIn.run([
'var ele = [];',
'for (let i = 0; i < 1e6 + 1; i++) ele[i] = 0;',
- 'ele.biu = 1;'
+ 'ele.biu = 1;',
]);
} else if (type === Buffer) {
putIn.run(['var ele = Buffer.alloc(1e6 + 1); ele.biu = 1;']);
@@ -583,7 +583,7 @@ const testCustomCompleterSyncMode = repl.start({
testCustomCompleterSyncMode.complete('', common.mustCall((error, data) => {
assert.deepStrictEqual(data, [
customCompletions,
- ''
+ '',
]);
}));
@@ -591,7 +591,7 @@ testCustomCompleterSyncMode.complete('', common.mustCall((error, data) => {
testCustomCompleterSyncMode.complete('a', common.mustCall((error, data) => {
assert.deepStrictEqual(data, [
'aaa aa1 aa2'.split(' '),
- 'a'
+ 'a',
]);
}));
@@ -613,7 +613,7 @@ const testCustomCompleterAsyncMode = repl.start({
testCustomCompleterAsyncMode.complete('', common.mustCall((error, data) => {
assert.deepStrictEqual(data, [
customCompletions,
- ''
+ '',
]);
}));
@@ -621,7 +621,7 @@ testCustomCompleterAsyncMode.complete('', common.mustCall((error, data) => {
testCustomCompleterAsyncMode.complete('a', common.mustCall((error, data) => {
assert.deepStrictEqual(data, [
'aaa aa1 aa2'.split(' '),
- 'a'
+ 'a',
]);
}));
diff --git a/test/parallel/test-repl-top-level-await.js b/test/parallel/test-repl-top-level-await.js
index 018d870700..464aae9b07 100644
--- a/test/parallel/test-repl-top-level-await.js
+++ b/test/parallel/test-repl-top-level-await.js
@@ -81,7 +81,7 @@ async function ordinaryTests() {
// https://cs.chromium.org/chromium/src/third_party/WebKit/LayoutTests/http/tests/devtools/console/console-top-level-await.js?rcl=5d0ea979f0ba87655b7ef0e03b58fa3c04986ba6
putIn.run([
'function foo(x) { return x; }',
- 'function koo() { return Promise.resolve(4); }'
+ 'function koo() { return Promise.resolve(4); }',
]);
const testCases = [
['await Promise.resolve(0)', '0'],
@@ -139,9 +139,9 @@ async function ordinaryTests() {
'1',
'2',
'3',
- 'undefined'
- ]
- ]
+ 'undefined',
+ ],
+ ],
];
for (const [input, expected = [`${input}\r`], options = {}] of testCases) {
@@ -167,13 +167,13 @@ async function ctrlCTest() {
putIn.run([
`const timeout = (msecs) => new Promise((resolve) => {
setTimeout(resolve, msecs).unref();
- });`
+ });`,
]);
console.log('Testing Ctrl+C');
assert.deepStrictEqual(await runAndWait([
'await timeout(100000)',
- { ctrl: true, name: 'c' }
+ { ctrl: true, name: 'c' },
]), [
'await timeout(100000)\r',
'Uncaught:',
@@ -181,7 +181,7 @@ async function ctrlCTest() {
'Script execution was interrupted by `SIGINT`] {',
" code: 'ERR_SCRIPT_EXECUTION_INTERRUPTED'",
'}',
- PROMPT
+ PROMPT,
]);
}
diff --git a/test/parallel/test-repl-uncaught-exception-standalone.js b/test/parallel/test-repl-uncaught-exception-standalone.js
index e7371f9f7c..8edf47b243 100644
--- a/test/parallel/test-repl-uncaught-exception-standalone.js
+++ b/test/parallel/test-repl-uncaught-exception-standalone.js
@@ -24,7 +24,7 @@ child.on('exit', common.mustCall(() => {
'undefined',
// x\n
'> Foobar',
- '> '
+ '> ',
]
);
}));
diff --git a/test/parallel/test-repl-uncaught-exception.js b/test/parallel/test-repl-uncaught-exception.js
index 28e62dff22..9d443b4e2c 100644
--- a/test/parallel/test-repl-uncaught-exception.js
+++ b/test/parallel/test-repl-uncaught-exception.js
@@ -64,7 +64,7 @@ const tests = [
command: 'console.log("Baz");' +
'process.on("uncaughtException", () => console.log("Foobar"));\n',
expected: /^Baz\nUncaught:\nTypeError \[ERR_INVALID_REPL_INPUT]:.*uncaughtException/
- }
+ },
];
process.on('exit', () => {
diff --git a/test/parallel/test-repl-underscore.js b/test/parallel/test-repl-underscore.js
index c05c387471..1802f8b8ff 100644
--- a/test/parallel/test-repl-underscore.js
+++ b/test/parallel/test-repl-underscore.js
@@ -41,7 +41,7 @@ function testSloppyMode() {
'30',
'30',
'40',
- '30'
+ '30',
]);
}
@@ -74,7 +74,7 @@ function testStrictMode() {
'30',
'undefined',
'undefined',
- '30'
+ '30',
]);
}
@@ -107,7 +107,7 @@ function testMagicMode() {
'30',
'undefined',
'50',
- '30'
+ '30',
]);
}
@@ -129,7 +129,7 @@ function testResetContext() {
'Clearing context...',
'10',
'20',
- '20'
+ '20',
]);
}
@@ -216,7 +216,7 @@ function testError() {
'Expression assignment to _error now disabled.',
'0',
'Uncaught Error: quux',
- '0'
+ '0',
]);
});
}
diff --git a/test/parallel/test-repl-use-global.js b/test/parallel/test-repl-use-global.js
index 4ac3830460..3457d0c5ba 100644
--- a/test/parallel/test-repl-use-global.js
+++ b/test/parallel/test-repl-use-global.js
@@ -11,7 +11,7 @@ const assert = require('assert');
const globalTestCases = [
[false, 'undefined'],
[true, '\'tacos\''],
- [undefined, 'undefined']
+ [undefined, 'undefined'],
];
const globalTest = (useGlobal, cb, output) => (err, repl) => {
diff --git a/test/parallel/test-repl.js b/test/parallel/test-repl.js
index e900f3ce15..bbb95f3fa3 100644
--- a/test/parallel/test-repl.js
+++ b/test/parallel/test-repl.js
@@ -120,14 +120,14 @@ const unixTests = [
{
send: '{a:1}',
expect: '{ a: 1 }'
- }
+ },
];
const strictModeTests = [
{
send: 'ref = 1',
expect: [/^Uncaught ReferenceError:\s/]
- }
+ },
];
const errorTests = [
@@ -242,7 +242,7 @@ const errorTests = [
kSource,
kArrow,
'',
- /^Uncaught SyntaxError: /
+ /^Uncaught SyntaxError: /,
]
},
{
@@ -251,7 +251,7 @@ const errorTests = [
kSource,
kArrow,
'',
- /^Uncaught SyntaxError: /
+ /^Uncaught SyntaxError: /,
]
},
{
@@ -260,7 +260,7 @@ const errorTests = [
kSource,
kArrow,
'',
- /^Uncaught SyntaxError: /
+ /^Uncaught SyntaxError: /,
]
},
{
@@ -269,7 +269,7 @@ const errorTests = [
kSource,
kArrow,
'',
- /^Uncaught SyntaxError: /
+ /^Uncaught SyntaxError: /,
]
},
{
@@ -278,7 +278,7 @@ const errorTests = [
kSource,
kArrow,
'',
- /^Uncaught SyntaxError: /
+ /^Uncaught SyntaxError: /,
]
},
{
@@ -288,7 +288,7 @@ const errorTests = [
kArrow,
'',
'Uncaught:',
- /^SyntaxError: /
+ /^SyntaxError: /,
]
},
// Named functions can be used:
@@ -373,7 +373,7 @@ const errorTests = [
send: 'npm install foobar',
expect: [
'npm should be run outside of the Node.js REPL, in your normal shell.',
- '(Press Ctrl+D to exit.)'
+ '(Press Ctrl+D to exit.)',
]
},
{
@@ -411,7 +411,7 @@ const errorTests = [
kSource,
kArrow,
'',
- /^Uncaught SyntaxError: /
+ /^Uncaught SyntaxError: /,
]
},
// Do not fail when a String is created with line continuation
@@ -454,7 +454,7 @@ const errorTests = [
/\.save/,
'',
'Press Ctrl+C to abort current expression, Ctrl+D to exit the REPL',
- /'thefourtheye'/
+ /'thefourtheye'/,
]
},
// Check for wrapped objects.
@@ -468,7 +468,7 @@ const errorTests = [
kSource,
kArrow,
'',
- /^Uncaught SyntaxError: /
+ /^Uncaught SyntaxError: /,
]
},
{
@@ -573,7 +573,7 @@ const errorTests = [
/^ at .*/,
" code: 'MODULE_NOT_FOUND',",
" requireStack: [ '<repl>' ]",
- '}'
+ '}',
]
},
// REPL should handle quotes within regexp literal in multiline mode
@@ -605,7 +605,7 @@ const errorTests = [
kSource,
kArrow,
'',
- /^Uncaught SyntaxError: /
+ /^Uncaught SyntaxError: /,
]
},
// Mitigate https://github.com/nodejs/node/issues/548
@@ -624,7 +624,7 @@ const errorTests = [
kSource,
kArrow,
'',
- /^Uncaught SyntaxError: /
+ /^Uncaught SyntaxError: /,
]
},
// Avoid emitting stack trace
@@ -634,7 +634,7 @@ const errorTests = [
kSource,
kArrow,
'',
- /^Uncaught SyntaxError: /
+ /^Uncaught SyntaxError: /,
]
},
@@ -702,7 +702,7 @@ const errorTests = [
kSource,
kArrow,
'',
- /^Uncaught SyntaxError: /
+ /^Uncaught SyntaxError: /,
]
},
// Bring back the repl to prompt
@@ -716,7 +716,7 @@ const errorTests = [
kSource,
kArrow,
'',
- /^Uncaught SyntaxError: /
+ /^Uncaught SyntaxError: /,
]
},
{
@@ -725,7 +725,7 @@ const errorTests = [
'... ... {',
kArrow,
'',
- /^Uncaught SyntaxError: /
+ /^Uncaught SyntaxError: /,
]
},
{
@@ -734,7 +734,7 @@ const errorTests = [
kSource,
kArrow,
'',
- /^Uncaught SyntaxError: /
+ /^Uncaught SyntaxError: /,
]
},
{
@@ -751,7 +751,7 @@ const errorTests = [
kSource,
kArrow,
'',
- /^Uncaught SyntaxError: /
+ /^Uncaught SyntaxError: /,
]
},
{
@@ -813,9 +813,9 @@ const tcpTests = [
kArrow,
'',
'Uncaught:',
- /^SyntaxError: .* dynamic import/
+ /^SyntaxError: .* dynamic import/,
]
- }
+ },
];
(async function() {
@@ -871,7 +871,7 @@ function startTCPRepl() {
return Promise.all([
new Promise((resolve) => resolveSocket = resolve),
- new Promise((resolve) => resolveReplServer = resolve)
+ new Promise((resolve) => resolveReplServer = resolve),
]);
}
@@ -916,7 +916,7 @@ function startUnixRepl() {
return Promise.all([
new Promise((resolve) => resolveSocket = resolve),
- new Promise((resolve) => resolveReplServer = resolve)
+ new Promise((resolve) => resolveReplServer = resolve),
]);
}
diff --git a/test/parallel/test-require-extension-over-directory.js b/test/parallel/test-require-extension-over-directory.js
index 9225876151..d1f7407e3d 100644
--- a/test/parallel/test-require-extension-over-directory.js
+++ b/test/parallel/test-require-extension-over-directory.js
@@ -18,7 +18,7 @@ assert.strictEqual(
const fakePath = [
fixtures.path('module-extension-over-directory', 'inner'),
'fake',
- '..'
+ '..',
].join(path.sep);
const fixturesRequireDir = require(fakePath);
diff --git a/test/parallel/test-resource-usage.js b/test/parallel/test-resource-usage.js
index ff41452f4a..d46fe4aeb7 100644
--- a/test/parallel/test-resource-usage.js
+++ b/test/parallel/test-resource-usage.js
@@ -19,7 +19,7 @@ const fields = [
'ipcReceived',
'signalsCount',
'voluntaryContextSwitches',
- 'involuntaryContextSwitches'
+ 'involuntaryContextSwitches',
];
assert.deepStrictEqual(Object.keys(rusage).sort(), fields.sort());
diff --git a/test/parallel/test-source-map-enable.js b/test/parallel/test-source-map-enable.js
index 9df38cba6c..766c1e2955 100644
--- a/test/parallel/test-source-map-enable.js
+++ b/test/parallel/test-source-map-enable.js
@@ -23,7 +23,7 @@ function nextdir() {
{
const coverageDirectory = nextdir();
const output = spawnSync(process.execPath, [
- require.resolve('../fixtures/source-map/basic')
+ require.resolve('../fixtures/source-map/basic'),
], { env: { ...process.env, NODE_V8_COVERAGE: coverageDirectory } });
if (output.status !== 0) {
console.log(output.stderr.toString());
@@ -38,7 +38,7 @@ function nextdir() {
{
const coverageDirectory = nextdir();
const output = spawnSync(process.execPath, [
- require.resolve('../fixtures/source-map/sigint')
+ require.resolve('../fixtures/source-map/sigint'),
], { env: { ...process.env, NODE_V8_COVERAGE: coverageDirectory } });
if (!common.isWindows) {
if (output.signal !== 'SIGINT') {
@@ -55,7 +55,7 @@ function nextdir() {
{
const coverageDirectory = nextdir();
const output = spawnSync(process.execPath, [
- require.resolve('../fixtures/source-map/exit-1')
+ require.resolve('../fixtures/source-map/exit-1'),
], { env: { ...process.env, NODE_V8_COVERAGE: coverageDirectory } });
assert.strictEqual(output.stderr.toString(), '');
const sourceMap = getSourceMapFromCache('exit-1.js', coverageDirectory);
@@ -67,7 +67,7 @@ function nextdir() {
const coverageDirectory = nextdir();
const output = spawnSync(process.execPath, [
'--no-warnings',
- require.resolve('../fixtures/source-map/esm-basic.mjs')
+ require.resolve('../fixtures/source-map/esm-basic.mjs'),
], { env: { ...process.env, NODE_V8_COVERAGE: coverageDirectory } });
assert.strictEqual(output.stderr.toString(), '');
const sourceMap = getSourceMapFromCache('esm-basic.mjs', coverageDirectory);
@@ -78,7 +78,7 @@ function nextdir() {
{
const coverageDirectory = nextdir();
const output = spawnSync(process.execPath, [
- require.resolve('../fixtures/source-map/disk-relative-path')
+ require.resolve('../fixtures/source-map/disk-relative-path'),
], { env: { ...process.env, NODE_V8_COVERAGE: coverageDirectory } });
assert.strictEqual(output.status, 0);
assert.strictEqual(output.stderr.toString(), '');
@@ -99,7 +99,7 @@ function nextdir() {
{
const coverageDirectory = nextdir();
const output = spawnSync(process.execPath, [
- require.resolve('../fixtures/source-map/inline-base64.js')
+ require.resolve('../fixtures/source-map/inline-base64.js'),
], { env: { ...process.env, NODE_V8_COVERAGE: coverageDirectory } });
assert.strictEqual(output.status, 0);
assert.strictEqual(output.stderr.toString(), '');
@@ -120,7 +120,7 @@ function nextdir() {
{
const coverageDirectory = nextdir();
const output = spawnSync(process.execPath, [
- require.resolve('../fixtures/source-map/inline-base64-type-error.js')
+ require.resolve('../fixtures/source-map/inline-base64-type-error.js'),
], { env: { ...process.env, NODE_V8_COVERAGE: coverageDirectory } });
assert.strictEqual(output.status, 0);
assert.strictEqual(output.stderr.toString(), '');
@@ -136,7 +136,7 @@ function nextdir() {
{
const coverageDirectory = nextdir();
const output = spawnSync(process.execPath, [
- require.resolve('../fixtures/source-map/inline-base64-json-error.js')
+ require.resolve('../fixtures/source-map/inline-base64-json-error.js'),
], { env: { ...process.env, NODE_V8_COVERAGE: coverageDirectory } });
assert.strictEqual(output.status, 0);
assert.strictEqual(output.stderr.toString(), '');
@@ -152,7 +152,7 @@ function nextdir() {
// is not set.
{
const output = spawnSync(process.execPath, [
- require.resolve('../fixtures/source-map/uglify-throw.js')
+ require.resolve('../fixtures/source-map/uglify-throw.js'),
]);
assert.strictEqual(
output.stderr.toString().match(/.*uglify-throw-original\.js:5:9/),
@@ -168,7 +168,7 @@ function nextdir() {
{
const output = spawnSync(process.execPath, [
'--enable-source-maps',
- require.resolve('../fixtures/source-map/uglify-throw.js')
+ require.resolve('../fixtures/source-map/uglify-throw.js'),
]);
assert.match(
output.stderr.toString(),
@@ -185,7 +185,7 @@ function nextdir() {
{
const output = spawnSync(process.execPath, [
'--enable-source-maps',
- require.resolve('../fixtures/source-map/typescript-throw.js')
+ require.resolve('../fixtures/source-map/typescript-throw.js'),
]);
assert.ok(output.stderr.toString().match(/.*typescript-throw\.ts:18:11/));
assert.ok(output.stderr.toString().match(/.*typescript-throw\.ts:24:1/));
@@ -195,7 +195,7 @@ function nextdir() {
{
const output = spawnSync(process.execPath, [
'--enable-source-maps',
- require.resolve('../fixtures/source-map/babel-throw.js')
+ require.resolve('../fixtures/source-map/babel-throw.js'),
]);
assert.ok(
output.stderr.toString().match(/.*babel-throw-original\.js:18:31/)
@@ -206,7 +206,7 @@ function nextdir() {
{
const output = spawnSync(process.execPath, [
'--enable-source-maps',
- require.resolve('../fixtures/source-map/istanbul-throw.js')
+ require.resolve('../fixtures/source-map/istanbul-throw.js'),
]);
assert.ok(
output.stderr.toString().match(/.*istanbul-throw-original\.js:5:9/)
@@ -220,7 +220,7 @@ function nextdir() {
{
const output = spawnSync(process.execPath, [
'--enable-source-maps',
- require.resolve('../fixtures/source-map/babel-esm.mjs')
+ require.resolve('../fixtures/source-map/babel-esm.mjs'),
]);
assert.ok(
output.stderr.toString().match(/.*babel-esm-original\.mjs:9:29/)
@@ -231,7 +231,7 @@ function nextdir() {
{
const coverageDirectory = nextdir();
spawnSync(process.execPath, [
- require.resolve('../fixtures/source-map/inline-base64.js')
+ require.resolve('../fixtures/source-map/inline-base64.js'),
], { env: { ...process.env, NODE_V8_COVERAGE: coverageDirectory } });
const sourceMap = getSourceMapFromCache(
'inline-base64.js',
@@ -244,7 +244,7 @@ function nextdir() {
{
const coverageDirectory = nextdir();
spawnSync(process.execPath, [
- require.resolve('../fixtures/source-map/istanbul-throw.js')
+ require.resolve('../fixtures/source-map/istanbul-throw.js'),
], { env: { ...process.env, NODE_V8_COVERAGE: coverageDirectory } });
const sourceMap = getSourceMapFromCache(
'istanbul-throw.js',
@@ -261,7 +261,7 @@ function nextdir() {
{
const output = spawnSync(process.execPath, [
'--enable-source-maps',
- require.resolve('../fixtures/source-map/emptyStackError.js')
+ require.resolve('../fixtures/source-map/emptyStackError.js'),
]);
assert.ok(
@@ -276,7 +276,7 @@ function nextdir() {
{
const output = spawnSync(process.execPath, [
'--enable-source-maps',
- require.resolve('../fixtures/source-map/webpack.js')
+ require.resolve('../fixtures/source-map/webpack.js'),
]);
// Error in original context of source content:
assert.match(
@@ -295,7 +295,7 @@ function nextdir() {
const coverageDirectory = nextdir();
const output = spawnSync(process.execPath, [
'--enable-source-maps',
- require.resolve('../fixtures/source-map/throw-on-require-entry.js')
+ require.resolve('../fixtures/source-map/throw-on-require-entry.js'),
], { env: { ...process.env, NODE_V8_COVERAGE: coverageDirectory } });
const sourceMap = getSourceMapFromCache(
'throw-on-require.js',
diff --git a/test/parallel/test-stream-pipeline-process.js b/test/parallel/test-stream-pipeline-process.js
index bd17b31eed..a535e7263e 100644
--- a/test/parallel/test-stream-pipeline-process.js
+++ b/test/parallel/test-stream-pipeline-process.js
@@ -19,7 +19,7 @@ if (process.argv[2] === 'child') {
'|',
`"${process.execPath}"`,
`"${__filename}"`,
- 'child'
+ 'child',
].join(' '), common.mustSucceed((stdout) => {
assert.strictEqual(stdout.split(os.EOL).shift().trim(), 'hello');
}));
diff --git a/test/parallel/test-stream-pipeline.js b/test/parallel/test-stream-pipeline.js
index ed5a3d9a0b..e2e5fe2e0d 100644
--- a/test/parallel/test-stream-pipeline.js
+++ b/test/parallel/test-stream-pipeline.js
@@ -22,7 +22,7 @@ const net = require('net');
const expected = [
Buffer.from('a'),
Buffer.from('b'),
- Buffer.from('c')
+ Buffer.from('c'),
];
const read = new Readable({
@@ -347,7 +347,7 @@ const net = require('net');
const expected = [
Buffer.from('hello'),
- Buffer.from('world')
+ Buffer.from('world'),
];
const rs = new Readable({
diff --git a/test/parallel/test-stream-promises.js b/test/parallel/test-stream-promises.js
index 86c44b279f..33bfa29272 100644
--- a/test/parallel/test-stream-promises.js
+++ b/test/parallel/test-stream-promises.js
@@ -27,7 +27,7 @@ assert.strictEqual(finished, promisify(stream.finished));
const expected = [
Buffer.from('a'),
Buffer.from('b'),
- Buffer.from('c')
+ Buffer.from('c'),
];
const read = new Readable({
diff --git a/test/parallel/test-stream-writev.js b/test/parallel/test-stream-writev.js
index 7aba543f07..5a42411c6f 100644
--- a/test/parallel/test-stream-writev.js
+++ b/test/parallel/test-stream-writev.js
@@ -71,13 +71,13 @@ function test(decode, uncork, multi, next) {
{ encoding: 'buffer',
chunk: [10, 97, 110, 100, 32, 116, 104, 101, 110, 46, 46, 46] },
{ encoding: 'buffer',
- chunk: [250, 206, 190, 167, 222, 173, 190, 239, 222, 202, 251, 173] }
+ chunk: [250, 206, 190, 167, 222, 173, 190, 239, 222, 202, 251, 173] },
] : [
{ encoding: 'ascii', chunk: 'hello, ' },
{ encoding: 'utf8', chunk: 'world' },
{ encoding: 'buffer', chunk: [33] },
{ encoding: 'latin1', chunk: '\nand then...' },
- { encoding: 'hex', chunk: 'facebea7deadbeefdecafbad' }
+ { encoding: 'hex', chunk: 'facebea7deadbeefdecafbad' },
];
let actualChunks;
diff --git a/test/parallel/test-stream2-objects.js b/test/parallel/test-stream2-objects.js
index a6723daca6..a713a5de18 100644
--- a/test/parallel/test-stream2-objects.js
+++ b/test/parallel/test-stream2-objects.js
@@ -70,7 +70,7 @@ function fromArray(list) {
r.pipe(toArray(common.mustCall(function(list) {
assert.deepStrictEqual(list, [
{ one: '1' },
- { two: '2' }
+ { two: '2' },
]);
})));
}
@@ -95,7 +95,7 @@ function fromArray(list) {
r.pipe(toArray(common.mustCall(function(list) {
assert.deepStrictEqual(list, [
{ one: '1' },
- { two: '2' }
+ { two: '2' },
]);
})));
}
@@ -114,7 +114,7 @@ function fromArray(list) {
r.pipe(toArray(common.mustCall(function(list) {
assert.deepStrictEqual(list, [
{ one: '1' },
- { two: '2' }
+ { two: '2' },
]);
})));
}
diff --git a/test/parallel/test-stream2-transform.js b/test/parallel/test-stream2-transform.js
index fe27c1c1b6..849cfb3538 100644
--- a/test/parallel/test-stream2-transform.js
+++ b/test/parallel/test-stream2-transform.js
@@ -405,7 +405,7 @@ const { PassThrough, Transform } = require('stream');
{ foo: 'bar' },
100,
'string',
- { nested: { things: [ { foo: 'bar' }, 100, 'string' ] } }
+ { nested: { things: [ { foo: 'bar' }, 100, 'string' ] } },
];
let ended = false;
@@ -446,7 +446,7 @@ const { PassThrough, Transform } = require('stream');
{ foo: 'bar' },
100,
'string',
- { nested: { things: [ { foo: 'bar' }, 100, 'string' ] } }
+ { nested: { things: [ { foo: 'bar' }, 100, 'string' ] } },
];
let ended = false;
diff --git a/test/parallel/test-string-decoder-fuzz.js b/test/parallel/test-string-decoder-fuzz.js
index ac6f74e949..3a6108e8fc 100644
--- a/test/parallel/test-string-decoder-fuzz.js
+++ b/test/parallel/test-string-decoder-fuzz.js
@@ -20,7 +20,7 @@ function randBuf(maxLen) {
}
const encodings = [
- 'utf16le', 'utf8', 'ascii', 'hex', 'base64', 'latin1', 'base64url'
+ 'utf16le', 'utf8', 'ascii', 'hex', 'base64', 'latin1', 'base64url',
];
function runSingleFuzzTest() {
diff --git a/test/parallel/test-timers-active.js b/test/parallel/test-timers-active.js
index a98d32c0b0..ac79c6fc1e 100644
--- a/test/parallel/test-timers-active.js
+++ b/test/parallel/test-timers-active.js
@@ -6,7 +6,7 @@ const active = require('timers').active;
// active() should create timers for these
const legitTimers = [
{ _idleTimeout: 0 },
- { _idleTimeout: 1 }
+ { _idleTimeout: 1 },
];
legitTimers.forEach(function(legit) {
diff --git a/test/parallel/test-timers-enroll-invalid-msecs.js b/test/parallel/test-timers-enroll-invalid-msecs.js
index f82bf29d74..466f1a2c4a 100644
--- a/test/parallel/test-timers-enroll-invalid-msecs.js
+++ b/test/parallel/test-timers-enroll-invalid-msecs.js
@@ -9,7 +9,7 @@ const timers = require('timers');
[],
'foo',
() => { },
- Symbol('foo')
+ Symbol('foo'),
].forEach((val) => {
assert.throws(
() => timers.enroll({}, val),
@@ -23,7 +23,7 @@ const timers = require('timers');
[
-1,
Infinity,
- NaN
+ NaN,
].forEach((val) => {
assert.throws(
() => timers.enroll({}, val),
diff --git a/test/parallel/test-timers-interval-promisified.js b/test/parallel/test-timers-interval-promisified.js
index 6051137248..28a0d0b47c 100644
--- a/test/parallel/test-timers-interval-promisified.js
+++ b/test/parallel/test-timers-interval-promisified.js
@@ -243,6 +243,6 @@ process.on('multipleResolves', common.mustNotCall());
return iterator.return();
}).then(res);
}),
- setPromiseTimeout(time_unit * 3).then(() => post = true)
+ setPromiseTimeout(time_unit * 3).then(() => post = true),
]).then(common.mustCall());
}
diff --git a/test/parallel/test-timers.js b/test/parallel/test-timers.js
index b8733f79f5..e04c1f3f18 100644
--- a/test/parallel/test-timers.js
+++ b/test/parallel/test-timers.js
@@ -48,7 +48,7 @@ const inputs = [
1,
1.0,
2147483648, // Browser behavior: timeouts > 2^31-1 run on next tick
- 12345678901234 // ditto
+ 12345678901234, // ditto
];
const timeouts = [];
diff --git a/test/parallel/test-tls-cipher-list.js b/test/parallel/test-tls-cipher-list.js
index b3c34a74bf..b1a6140589 100644
--- a/test/parallel/test-tls-cipher-list.js
+++ b/test/parallel/test-tls-cipher-list.js
@@ -12,7 +12,7 @@ function doCheck(arg, expression, check) {
let out = '';
arg = arg.concat([
'-pe',
- expression
+ expression,
]);
spawn(process.execPath, arg, {})
.on('error', common.mustNotCall())
diff --git a/test/parallel/test-tls-client-verify.js b/test/parallel/test-tls-client-verify.js
index e584c51cf2..a8de1078bf 100644
--- a/test/parallel/test-tls-client-verify.js
+++ b/test/parallel/test-tls-client-verify.js
@@ -35,7 +35,7 @@ const testCases = [
servers: [
{ ok: true, key: 'agent1-key', cert: 'agent1-cert' },
{ ok: false, key: 'agent2-key', cert: 'agent2-cert' },
- { ok: false, key: 'agent3-key', cert: 'agent3-cert' }
+ { ok: false, key: 'agent3-key', cert: 'agent3-cert' },
] },
{ ca: [],
@@ -44,7 +44,7 @@ const testCases = [
servers: [
{ ok: false, key: 'agent1-key', cert: 'agent1-cert' },
{ ok: false, key: 'agent2-key', cert: 'agent2-cert' },
- { ok: false, key: 'agent3-key', cert: 'agent3-cert' }
+ { ok: false, key: 'agent3-key', cert: 'agent3-cert' },
] },
{ ca: ['ca1-cert', 'ca2-cert'],
@@ -53,8 +53,8 @@ const testCases = [
servers: [
{ ok: true, key: 'agent1-key', cert: 'agent1-cert' },
{ ok: false, key: 'agent2-key', cert: 'agent2-cert' },
- { ok: true, key: 'agent3-key', cert: 'agent3-cert' }
- ] }
+ { ok: true, key: 'agent3-key', cert: 'agent3-cert' },
+ ] },
];
diff --git a/test/parallel/test-tls-cnnic-whitelist.js b/test/parallel/test-tls-cnnic-whitelist.js
index e08e93013f..99ad02ee1c 100644
--- a/test/parallel/test-tls-cnnic-whitelist.js
+++ b/test/parallel/test-tls-cnnic-whitelist.js
@@ -31,7 +31,7 @@ const testCases = [
rejectUnauthorized: true
},
errorCode: 'UNABLE_TO_GET_ISSUER_CERT_LOCALLY'
- }
+ },
];
function runTest(tindex) {
diff --git a/test/parallel/test-tls-ecdh-multiple.js b/test/parallel/test-tls-ecdh-multiple.js
index 1fcfc041bd..25e6314a54 100644
--- a/test/parallel/test-tls-ecdh-multiple.js
+++ b/test/parallel/test-tls-ecdh-multiple.js
@@ -62,7 +62,7 @@ process.on('exit', function() {
const unsupportedCurves = [
'wap-wsg-idm-ecid-wtls1',
'c2pnb163v1',
- 'prime192v3'
+ 'prime192v3',
];
// Brainpool is not supported in FIPS mode
diff --git a/test/parallel/test-tls-getprotocol.js b/test/parallel/test-tls-getprotocol.js
index e4a16a818b..02c683c71c 100644
--- a/test/parallel/test-tls-getprotocol.js
+++ b/test/parallel/test-tls-getprotocol.js
@@ -13,7 +13,7 @@ const fixtures = require('../common/fixtures');
const clientConfigs = [
{ secureProtocol: 'TLSv1_method', version: 'TLSv1' },
{ secureProtocol: 'TLSv1_1_method', version: 'TLSv1.1' },
- { secureProtocol: 'TLSv1_2_method', version: 'TLSv1.2' }
+ { secureProtocol: 'TLSv1_2_method', version: 'TLSv1.2' },
];
const serverConfig = {
diff --git a/test/parallel/test-tls-multi-pfx.js b/test/parallel/test-tls-multi-pfx.js
index c20376a82a..f353183ce2 100644
--- a/test/parallel/test-tls-multi-pfx.js
+++ b/test/parallel/test-tls-multi-pfx.js
@@ -13,7 +13,7 @@ const options = {
buf: fixtures.readKey('agent1.pfx'),
passphrase: 'sample'
},
- fixtures.readKey('ec.pfx')
+ fixtures.readKey('ec.pfx'),
]
};
diff --git a/test/parallel/test-tls-options-boolean-check.js b/test/parallel/test-tls-options-boolean-check.js
index 4dae8e47c8..900a39f0c1 100644
--- a/test/parallel/test-tls-options-boolean-check.js
+++ b/test/parallel/test-tls-options-boolean-check.js
@@ -61,7 +61,7 @@ const caArrDataView = toDataView(caCert);
[[keyStr, keyStr2], false],
[false, [certStr, certStr2]],
[[{ pem: keyBuff }], false],
- [[{ pem: keyBuff }, { pem: keyBuff }], false]
+ [[{ pem: keyBuff }, { pem: keyBuff }], false],
].forEach(([key, cert]) => {
tls.createServer({ key, cert });
});
@@ -79,7 +79,7 @@ const caArrDataView = toDataView(caCert);
[[keyBuff, true], [certBuff, certBuff2], 1],
[[true, keyStr2], [certStr, certStr2], 0],
[[true, false], [certBuff, certBuff2], 0],
- [true, [certBuff, certBuff2]]
+ [true, [certBuff, certBuff2]],
].forEach(([key, cert, index]) => {
const val = index === undefined ? key : key[index];
assert.throws(() => {
@@ -105,7 +105,7 @@ const caArrDataView = toDataView(caCert);
[[keyBuff, keyBuff2], [true, certBuff2], 0],
[[keyStr, keyStr2], [certStr, true], 1],
[[keyStr, keyStr2], [true, false], 0],
- [[keyStr, keyStr2], true]
+ [[keyStr, keyStr2], true],
].forEach(([key, cert, index]) => {
const val = index === undefined ? cert : cert[index];
assert.throws(() => {
@@ -140,7 +140,7 @@ const caArrDataView = toDataView(caCert);
[keyBuff, certBuff, {}],
[keyBuff, certBuff, 1],
[keyBuff, certBuff, true],
- [keyBuff, certBuff, [caCert, true], 1]
+ [keyBuff, certBuff, [caCert, true], 1],
].forEach(([key, cert, ca, index]) => {
const val = index === undefined ? ca : ca[index];
assert.throws(() => {
@@ -161,7 +161,7 @@ const caArrDataView = toDataView(caCert);
[false, false, false],
[undefined, undefined, undefined],
['', '', ''],
- [0, 0, 0]
+ [0, 0, 0],
].forEach(([key, cert, ca]) => {
tls.createSecureContext({ key, cert, ca });
});
diff --git a/test/parallel/test-tls-psk-server.js b/test/parallel/test-tls-psk-server.js
index 434d31380f..b926095840 100644
--- a/test/parallel/test-tls-psk-server.js
+++ b/test/parallel/test-tls-psk-server.js
@@ -46,7 +46,7 @@ server.listen(0, () => {
'-connect', `127.0.0.1:${server.address().port}`,
'-cipher', CIPHERS,
'-psk', KEY,
- '-psk_identity', IDENTITY
+ '-psk_identity', IDENTITY,
]);
let out = '';
diff --git a/test/parallel/test-tls-server-verify.js b/test/parallel/test-tls-server-verify.js
index fe525b2fd1..51ccd0d747 100644
--- a/test/parallel/test-tls-server-verify.js
+++ b/test/parallel/test-tls-server-verify.js
@@ -53,7 +53,7 @@ const testCases =
[{ name: 'agent1', shouldReject: false, shouldAuth: false },
{ name: 'agent2', shouldReject: false, shouldAuth: false },
{ name: 'agent3', shouldReject: false, shouldAuth: false },
- { name: 'nocert', shouldReject: false, shouldAuth: false }
+ { name: 'nocert', shouldReject: false, shouldAuth: false },
] },
{ title: 'Allow both authed and unauthed connections with CA1',
@@ -65,7 +65,7 @@ const testCases =
[{ name: 'agent1', shouldReject: false, shouldAuth: true },
{ name: 'agent2', shouldReject: false, shouldAuth: false },
{ name: 'agent3', shouldReject: false, shouldAuth: false },
- { name: 'nocert', shouldReject: false, shouldAuth: false }
+ { name: 'nocert', shouldReject: false, shouldAuth: false },
] },
{ title: 'Do not request certs at connection. Do that later',
@@ -77,7 +77,7 @@ const testCases =
[{ name: 'agent1', shouldReject: false, shouldAuth: true },
{ name: 'agent2', shouldReject: false, shouldAuth: false },
{ name: 'agent3', shouldReject: false, shouldAuth: false },
- { name: 'nocert', shouldReject: false, shouldAuth: false }
+ { name: 'nocert', shouldReject: false, shouldAuth: false },
] },
{ title: 'Allow only authed connections with CA1',
@@ -89,7 +89,7 @@ const testCases =
[{ name: 'agent1', shouldReject: false, shouldAuth: true },
{ name: 'agent2', shouldReject: true },
{ name: 'agent3', shouldReject: true },
- { name: 'nocert', shouldReject: true }
+ { name: 'nocert', shouldReject: true },
] },
{ title: 'Allow only authed connections with CA1 and CA2',
@@ -101,7 +101,7 @@ const testCases =
[{ name: 'agent1', shouldReject: false, shouldAuth: true },
{ name: 'agent2', shouldReject: true },
{ name: 'agent3', shouldReject: false, shouldAuth: true },
- { name: 'nocert', shouldReject: true }
+ { name: 'nocert', shouldReject: true },
] },
@@ -117,8 +117,8 @@ const testCases =
{ name: 'agent3', shouldReject: false, shouldAuth: true },
// Agent4 has a cert in the CRL.
{ name: 'agent4', shouldReject: true, shouldAuth: false },
- { name: 'nocert', shouldReject: true }
- ] }
+ { name: 'nocert', shouldReject: true },
+ ] },
];
function filenamePEM(n) {
diff --git a/test/parallel/test-tls-session-cache.js b/test/parallel/test-tls-session-cache.js
index 92d39f763f..c4bebff2e3 100644
--- a/test/parallel/test-tls-session-cache.js
+++ b/test/parallel/test-tls-session-cache.js
@@ -104,7 +104,7 @@ function doTest(testOptions, callback) {
'-servername', 'ohgod',
'-key', fixtures.path('keys/rsa_private.pem'),
'-cert', fixtures.path('keys/rsa_cert.crt'),
- '-reconnect'
+ '-reconnect',
].concat(testOptions.tickets ? [] : '-no_ticket');
function spawnClient() {
diff --git a/test/parallel/test-tls-set-secure-context.js b/test/parallel/test-tls-set-secure-context.js
index 1e2abffa98..d62b6b9f94 100644
--- a/test/parallel/test-tls-set-secure-context.js
+++ b/test/parallel/test-tls-set-secure-context.js
@@ -21,7 +21,7 @@ const credentialOptions = [
key: fixtures.readKey('agent2-key.pem'),
cert: fixtures.readKey('agent2-cert.pem'),
ca: fixtures.readKey('ca2-cert.pem')
- }
+ },
];
let firstResponse;
diff --git a/test/parallel/test-tls-startcom-wosign-whitelist.js b/test/parallel/test-tls-startcom-wosign-whitelist.js
index 33da148848..56ffd73aac 100644
--- a/test/parallel/test-tls-startcom-wosign-whitelist.js
+++ b/test/parallel/test-tls-startcom-wosign-whitelist.js
@@ -39,7 +39,7 @@ const testCases = [
rejectUnauthorized: true
},
errorCode: 'CERT_REVOKED'
- }
+ },
];
diff --git a/test/parallel/test-tls-write-error.js b/test/parallel/test-tls-write-error.js
index 776fe65c72..b06f2fa2c5 100644
--- a/test/parallel/test-tls-write-error.js
+++ b/test/parallel/test-tls-write-error.js
@@ -46,7 +46,7 @@ const server = https.createServer(opts, (req, res) => {
cke,
ccs,
client.encrypt(finished),
- client.encrypt(ill)
+ client.encrypt(ill),
]);
client.write(frames, common.mustCall(() => {
client.end();
diff --git a/test/parallel/test-trace-events-api.js b/test/parallel/test-trace-events-api.js
index fa152334be..1cd0210f39 100644
--- a/test/parallel/test-trace-events-api.js
+++ b/test/parallel/test-trace-events-api.js
@@ -63,7 +63,7 @@ assert.strictEqual(tracing.enabled, true);
assert.strictEqual(getEnabledCategories(),
[
- ...[enabledCategories].filter((_) => !!_), 'node.perf'
+ ...[enabledCategories].filter((_) => !!_), 'node.perf',
].join(','));
tracing.disable();
@@ -142,7 +142,7 @@ function testApiInChildProcess(execArgs, cb) {
'--expose-gc',
'--expose-internals',
'--no-warnings',
- ...execArgs
+ ...execArgs,
]
});
diff --git a/test/parallel/test-trace-events-bootstrap.js b/test/parallel/test-trace-events-bootstrap.js
index 634ee7ece0..3b9cb95a69 100644
--- a/test/parallel/test-trace-events-bootstrap.js
+++ b/test/parallel/test-trace-events-bootstrap.js
@@ -12,7 +12,7 @@ const names = [
'v8Start',
'loopStart',
'loopExit',
- 'bootstrapComplete'
+ 'bootstrapComplete',
];
if (process.argv[2] === 'child') {
@@ -25,7 +25,7 @@ if (process.argv[2] === 'child') {
cwd: tmpdir.path,
execArgv: [
'--trace-event-categories',
- 'node.bootstrap'
+ 'node.bootstrap',
]
});
diff --git a/test/parallel/test-trace-events-console.js b/test/parallel/test-trace-events-console.js
index a4860b5da0..01a532d69e 100644
--- a/test/parallel/test-trace-events-console.js
+++ b/test/parallel/test-trace-events-console.js
@@ -11,7 +11,7 @@ const tmpdir = require('../common/tmpdir');
const names = [
'time::foo',
- 'count::bar'
+ 'count::bar',
];
const expectedCounts = [ 1, 2, 0 ];
const expectedTimeTypes = [ 'b', 'n', 'e' ];
@@ -37,7 +37,7 @@ if (process.argv[2] === 'child') {
cwd: tmpdir.path,
execArgv: [
'--trace-event-categories',
- 'node.console'
+ 'node.console',
]
});
diff --git a/test/parallel/test-trace-events-environment.js b/test/parallel/test-trace-events-environment.js
index 75714283fb..8105b8394b 100644
--- a/test/parallel/test-trace-events-environment.js
+++ b/test/parallel/test-trace-events-environment.js
@@ -17,7 +17,7 @@ const names = new Set([
'RunTimers',
'BeforeExit',
'RunCleanup',
- 'AtExit'
+ 'AtExit',
]);
if (process.argv[2] === 'child') {
@@ -37,7 +37,7 @@ if (process.argv[2] === 'child') {
cwd: tmpdir.path,
execArgv: [
'--trace-event-categories',
- 'node.environment'
+ 'node.environment',
]
});
diff --git a/test/parallel/test-trace-events-file-pattern.js b/test/parallel/test-trace-events-file-pattern.js
index d9cd8e66d2..0c5097b2e1 100644
--- a/test/parallel/test-trace-events-file-pattern.js
+++ b/test/parallel/test-trace-events-file-pattern.js
@@ -16,7 +16,7 @@ const proc = cp.spawn(process.execPath, [
'--trace-event-file-pattern',
// eslint-disable-next-line no-template-curly-in-string
'${pid}-${rotation}-${pid}-${rotation}.tracing.log',
- '-e', CODE
+ '-e', CODE,
], { cwd: tmpdir.path });
proc.once('exit', common.mustCall(() => {
diff --git a/test/parallel/test-trace-events-promises.js b/test/parallel/test-trace-events-promises.js
index 0dd4fddc6d..eec463369c 100644
--- a/test/parallel/test-trace-events-promises.js
+++ b/test/parallel/test-trace-events-promises.js
@@ -23,7 +23,7 @@ if (process.argv[2] === 'child') {
execArgv: [
'--no-warnings',
'--trace-event-categories',
- 'node.promises.rejections'
+ 'node.promises.rejections',
]
});
diff --git a/test/parallel/test-trace-events-vm.js b/test/parallel/test-trace-events-vm.js
index 3e5d32b6c3..b3d3a403be 100644
--- a/test/parallel/test-trace-events-vm.js
+++ b/test/parallel/test-trace-events-vm.js
@@ -9,7 +9,7 @@ const tmpdir = require('../common/tmpdir');
const names = [
'ContextifyScript::New',
'RunInThisContext',
- 'RunInContext'
+ 'RunInContext',
];
if (process.argv[2] === 'child') {
@@ -23,7 +23,7 @@ if (process.argv[2] === 'child') {
cwd: tmpdir.path,
execArgv: [
'--trace-event-categories',
- 'node.vm.script'
+ 'node.vm.script',
]
});
diff --git a/test/parallel/test-tracing-no-crash.js b/test/parallel/test-tracing-no-crash.js
index 0ae402f528..2e5d42b606 100644
--- a/test/parallel/test-tracing-no-crash.js
+++ b/test/parallel/test-tracing-no-crash.js
@@ -9,7 +9,7 @@ function CheckNoSignalAndErrorCodeOne(code, signal) {
}
const child = spawn(process.execPath, [
- '--trace-event-categories', 'madeup', '-e', 'throw new Error()'
+ '--trace-event-categories', 'madeup', '-e', 'throw new Error()',
], { stdio: [ 'inherit', 'inherit', 'pipe' ] });
child.on('exit', common.mustCall(CheckNoSignalAndErrorCodeOne));
diff --git a/test/parallel/test-tty-backwards-api.js b/test/parallel/test-tty-backwards-api.js
index b4005bad61..16e71aab9e 100644
--- a/test/parallel/test-tty-backwards-api.js
+++ b/test/parallel/test-tty-backwards-api.js
@@ -19,7 +19,7 @@ const { WriteStream } = require('tty');
'cursorTo',
'moveCursor',
'clearLine',
- 'clearScreenDown'
+ 'clearScreenDown',
].forEach((method) => {
readline[method] = common.mustCall(function() {
const lastArg = arguments[arguments.length - 1];
diff --git a/test/parallel/test-url-domain-ascii-unicode.js b/test/parallel/test-url-domain-ascii-unicode.js
index 49259a7ab0..737294c241 100644
--- a/test/parallel/test-url-domain-ascii-unicode.js
+++ b/test/parallel/test-url-domain-ascii-unicode.js
@@ -18,7 +18,7 @@ const domainWithASCII = [
['名がドメイン.com', 'xn--v8jxj3d1dzdz08w.com'],
['افغانستا.icom.museum', 'xn--mgbaal8b0b9b2b.icom.museum'],
['الجزائر.icom.fake', 'xn--lgbbat1ad8j.icom.fake'],
- ['भारत.org', 'xn--h2brj9c.org']
+ ['भारत.org', 'xn--h2brj9c.org'],
];
domainWithASCII.forEach((pair) => {
diff --git a/test/parallel/test-url-format-invalid-input.js b/test/parallel/test-url-format-invalid-input.js
index 99a35b76f0..efa1a9ba1d 100644
--- a/test/parallel/test-url-format-invalid-input.js
+++ b/test/parallel/test-url-format-invalid-input.js
@@ -10,7 +10,7 @@ const throwsObjsAndReportTypes = [
false,
0,
function() {},
- Symbol('foo')
+ Symbol('foo'),
];
for (const urlObject of throwsObjsAndReportTypes) {
diff --git a/test/parallel/test-url-parse-invalid-input.js b/test/parallel/test-url-parse-invalid-input.js
index ff63e91ecd..55db598e04 100644
--- a/test/parallel/test-url-parse-invalid-input.js
+++ b/test/parallel/test-url-parse-invalid-input.js
@@ -14,7 +14,7 @@ const url = require('url');
[[], 'object'],
[{}, 'object'],
[() => {}, 'function'],
- [Symbol('foo'), 'symbol']
+ [Symbol('foo'), 'symbol'],
].forEach(([val, type]) => {
assert.throws(() => {
url.parse(val);
diff --git a/test/parallel/test-url-pathtofileurl.js b/test/parallel/test-url-pathtofileurl.js
index 79adb58b77..068a04e661 100644
--- a/test/parallel/test-url-pathtofileurl.js
+++ b/test/parallel/test-url-pathtofileurl.js
@@ -90,7 +90,7 @@ const url = require('url');
// Rocket emoji (non-BMP code point)
{ path: 'C:\\🚀', expected: 'file:///C:/%F0%9F%9A%80' },
// UNC path (see https://docs.microsoft.com/en-us/archive/blogs/ie/file-uris-in-windows)
- { path: '\\\\nas\\My Docs\\File.doc', expected: 'file://nas/My%20Docs/File.doc' }
+ { path: '\\\\nas\\My Docs\\File.doc', expected: 'file://nas/My%20Docs/File.doc' },
];
} else {
testCases = [
diff --git a/test/parallel/test-url-relative.js b/test/parallel/test-url-relative.js
index e4aee99a77..1eb2bdc58f 100644
--- a/test/parallel/test-url-relative.js
+++ b/test/parallel/test-url-relative.js
@@ -52,7 +52,7 @@ const relativeTests = [
'http://example.com/a/b/c/d'],
['/foo/bar/baz', '/../etc/passwd', '/etc/passwd'],
['http://localhost', 'file:///Users/foo', 'file:///Users/foo'],
- ['http://localhost', 'file://foo/Users', 'file://foo/Users']
+ ['http://localhost', 'file://foo/Users', 'file://foo/Users'],
];
relativeTests.forEach(function(relativeTest) {
const a = url.resolve(relativeTest[0], relativeTest[1]);
@@ -76,7 +76,7 @@ const bases = [
'http://a/b/c/d;p?q=1/2',
'http://a/b/c/d;p=1/2?q',
'fred:///s//a/b/c',
- 'http:///s//a/b/c'
+ 'http:///s//a/b/c',
];
// [to, from, result]
@@ -371,7 +371,7 @@ const relativeTests2 = [
'https://user:password@example.com/foo'],
// No path at all
- ['#hash1', '#hash2', '#hash1']
+ ['#hash1', '#hash2', '#hash1'],
];
relativeTests2.forEach(function(relativeTest) {
const a = url.resolve(relativeTest[1], relativeTest[0]);
diff --git a/test/parallel/test-util-callbackify.js b/test/parallel/test-util-callbackify.js
index 73234e71b7..444e10b16b 100644
--- a/test/parallel/test-util-callbackify.js
+++ b/test/parallel/test-util-callbackify.js
@@ -20,7 +20,7 @@ const values = [
Symbol('I am a symbol'),
function ok() {},
['array', 'with', 4, 'values'],
- new Error('boo')
+ new Error('boo'),
];
{
diff --git a/test/parallel/test-util-format.js b/test/parallel/test-util-format.js
index 11fe24fce7..3d64040764 100644
--- a/test/parallel/test-util-format.js
+++ b/test/parallel/test-util-format.js
@@ -484,7 +484,7 @@ assert.strictEqual(
5n,
5,
'test',
- Symbol()
+ Symbol(),
].forEach((invalidOptions) => {
assert.throws(() => {
util.formatWithOptions(invalidOptions, { a: true });
diff --git a/test/parallel/test-util-inspect.js b/test/parallel/test-util-inspect.js
index f70090f489..37d669c540 100644
--- a/test/parallel/test-util-inspect.js
+++ b/test/parallel/test-util-inspect.js
@@ -495,7 +495,7 @@ assert.strictEqual(
'true,',
"'4294967296': true,",
"'4294967295': true,",
- "'4294967297': true\n]"
+ "'4294967297': true\n]",
].join('\n '));
}
@@ -640,7 +640,7 @@ assert.strictEqual(util.inspect(-5e-324), '-5e-324');
new Error(),
new Error('FAIL'),
new TypeError('FAIL'),
- new SyntaxError('FAIL')
+ new SyntaxError('FAIL'),
].forEach((err) => {
assert.strictEqual(util.inspect(err), err.stack);
});
@@ -1629,7 +1629,7 @@ util.inspect(process);
" 'za' => 1,",
" 'zb' => 'test'",
' }',
- '}'
+ '}',
].join('\n');
assert.strictEqual(out, expect);
@@ -1637,7 +1637,7 @@ util.inspect(process);
expect = [
"'Lorem ipsum dolor\\n' +",
" 'sit amet,\\tconsectetur adipiscing elit, sed do eiusmod tempor " +
- "incididunt ut labore et dolore magna aliqua.'"
+ "incididunt ut labore et dolore magna aliqua.'",
].join('\n');
assert.strictEqual(out, expect);
@@ -1651,7 +1651,7 @@ util.inspect(process);
'12 45 78 01 34 67 90 23 56 89 123456789012345678901234567890',
{ compact: false, breakLength: 3 });
expect = [
- "'12 45 78 01 34 67 90 23 56 89 123456789012345678901234567890'"
+ "'12 45 78 01 34 67 90 23 56 89 123456789012345678901234567890'",
].join('\n');
assert.strictEqual(out, expect);
@@ -1662,7 +1662,7 @@ util.inspect(process);
'{',
' a: [Function (anonymous)],',
' b: [Number: 3]',
- '}'
+ '}',
].join('\n');
assert.strictEqual(out, expect);
@@ -1674,7 +1674,7 @@ util.inspect(process);
" [name]: ''",
' },',
' b: [Number: 3]',
- '}'
+ '}',
].join('\n');
assert.strictEqual(out, expect);
@@ -1752,7 +1752,7 @@ util.inspect(process);
' [Circular *1],',
" [Symbol(Symbol.toStringTag)]: 'Map Iterator'",
' }',
- '}'
+ '}',
].join('\n');
assert.strict.equal(out, expected);
@@ -1791,7 +1791,7 @@ util.inspect(process);
' [Circular *1],',
" [Symbol(Symbol.toStringTag)]: 'Map Iterator'",
' }',
- '}'
+ '}',
].join('\n');
assert.strict.equal(out, expected);
@@ -1832,7 +1832,7 @@ util.inspect(process);
' foo: true } ],',
' [Circular *1],',
' [Symbol(Symbol.toStringTag)]:',
- " 'Map Iterator' } }"
+ " 'Map Iterator' } }",
].join('\n');
assert.strict.equal(out, expected);
@@ -1930,7 +1930,7 @@ assert.strictEqual(util.inspect('"\'${a}'), "'\"\\'${a}'");
get name() {
return 'BazError';
}
- }, undefined]
+ }, undefined],
].forEach(([Class, message], i) => {
console.log('Test %i', i);
const foo = new Class(message);
@@ -2000,7 +2000,7 @@ assert.strictEqual(util.inspect('"\'${a}'), "'\"\\'${a}'");
// Foobar !!!
[class X extends /****/ Error
// More comments
- {}, '[class X extends Error]']
+ {}, '[class X extends Error]'],
/* eslint-enable spaced-comment, no-multi-spaces, brace-style */
].forEach(([clazz, string]) => {
const inspected = util.inspect(clazz);
@@ -2092,7 +2092,7 @@ assert.strictEqual(util.inspect('"\'${a}'), "'\"\\'${a}'");
[new Promise((resolve) => setTimeout(resolve, 10)), 'Promise { <pending> }'],
[new WeakSet(), 'WeakSet { <items unknown> }'],
[new WeakMap(), 'WeakMap { <items unknown> }'],
- [/foobar/g, '/foobar/g']
+ [/foobar/g, '/foobar/g'],
].forEach(([value, expected]) => {
Object.defineProperty(value, 'valueOf', {
get() {
@@ -2141,7 +2141,7 @@ assert.strictEqual(util.inspect('"\'${a}'), "'\"\\'${a}'");
'{\n [Uint8Contents]: <00 00>,\n byteLength: undefined\n}'],
[/foobar/, '[RegExp: null prototype] /foobar/'],
[new Date('Sun, 14 Feb 2010 11:48:40 GMT'),
- '[Date: null prototype] 2010-02-14T11:48:40.000Z']
+ '[Date: null prototype] 2010-02-14T11:48:40.000Z'],
].forEach(([value, expected]) => {
assert.strictEqual(
util.inspect(Object.setPrototypeOf(value, null)),
@@ -2163,7 +2163,7 @@ assert.strictEqual(util.inspect('"\'${a}'), "'\"\\'${a}'");
[10],
'[\n 0n, 0n, 0n, 0n, 0n,\n 0n, 0n, 0n, 0n, 0n\n]'],
[Date, ['Sun, 14 Feb 2010 11:48:40 GMT'], '2010-02-14T11:48:40.000Z'],
- [Date, ['invalid_date'], 'Invalid Date']
+ [Date, ['invalid_date'], 'Invalid Date'],
].forEach(([base, input, rawExpected]) => {
class Foo extends base {}
const value = new Foo(...input);
@@ -2253,7 +2253,7 @@ assert.strictEqual(
'blue',
'magenta',
'cyan',
- 'white'
+ 'white',
].forEach((color, i) => {
assert.deepStrictEqual(inspect.colors[color], [30 + i, 39]);
assert.deepStrictEqual(inspect.colors[`${color}Bright`], [90 + i, 39]);
@@ -2431,7 +2431,7 @@ assert.strictEqual(
b: [
1,
2,
- [ 1, 2, { a: 1, b: 2, c: 3 } ]
+ [ 1, 2, { a: 1, b: 2, c: 3 } ],
],
c: ['foo', 4, 444444],
d: Array.from({ length: 101 }).map((e, i) => {
@@ -2523,7 +2523,7 @@ assert.strictEqual(
" 'This text is too long for grouping!',",
" 'This text is too long for grouping!'",
' ]',
- '}'
+ '}',
].join('\n');
assert.strictEqual(out, expected);
@@ -2531,7 +2531,7 @@ assert.strictEqual(
obj = [
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 123456789
+ 1, 1, 1, 1, 1, 1, 123456789,
];
out = util.inspect(obj, { compact: 3 });
@@ -2545,7 +2545,7 @@ assert.strictEqual(
' 1, 1, 1, 1,',
' 1, 1, 1, 1,',
' 1, 1, 123456789',
- ']'
+ ']',
].join('\n');
assert.strictEqual(out, expected);
@@ -2553,7 +2553,7 @@ assert.strictEqual(
// Unicode support. あ has a length of one and a width of two.
obj = [
'123', '123', '123', '123', 'あああ',
- '123', '123', '123', '123', 'あああ'
+ '123', '123', '123', '123', 'あああ',
];
out = util.inspect(obj, { compact: 3 });
@@ -2627,7 +2627,7 @@ assert.strictEqual(
' \u001b[33m52\u001b[39m, \u001b[33m53\u001b[39m, \u001b[33m54\u001b[39m, \u001b[33m55\u001b[39m,',
' \u001b[33m56\u001b[39m, \u001b[33m57\u001b[39m, \u001b[33m58\u001b[39m, \u001b[33m59\u001b[39m',
/* eslint-enable max-len */
- ']'
+ ']',
].join('\n');
assert.strictEqual(out, expected);
@@ -2675,7 +2675,7 @@ assert.strictEqual(
'string_decoder', 'tls', 'trace_events',
'tty', 'url', 'v8',
'vm', 'worker_threads', 'zlib',
- '_', '_error', 'util'
+ '_', '_error', 'util',
];
out = util.inspect(
@@ -2721,7 +2721,7 @@ assert.strictEqual(
" 'tty', 'url', 'v8',",
" 'vm', 'worker_threads', 'zlib',",
" '_', '_error', 'util'",
- ']'
+ ']',
].join('\n');
assert.strictEqual(out, expected);
@@ -2741,10 +2741,10 @@ assert.strictEqual(
' at Module.require [as weird/name] (node:internal/aaaaa/loader:735:19)',
' at require (node:internal/modules/cjs/helpers:14:16)',
' at /test/test-util-inspect.js:2239:9',
- ' at getActual (node:assert:592:5)'
+ ' at getActual (node:assert:592:5)',
];
const isNodeCoreFile = [
- false, false, true, true, false, true, false, true, false, true
+ false, false, true, true, false, true, false, true, false, true,
];
const err = new TypeError('Wonderful message!');
err.stack = stack.join('\n');
diff --git a/test/parallel/test-util-log.js b/test/parallel/test-util-log.js
index 3de79b835d..854746290e 100644
--- a/test/parallel/test-util-log.js
+++ b/test/parallel/test-util-log.js
@@ -48,7 +48,7 @@ const tests = [
{ input: function() {}, output: '[Function: input]' },
{ input: parseInt('not a number', 10), output: 'NaN' },
{ input: { answer: 42 }, output: '{ answer: 42 }' },
- { input: [1, 2, 3], output: '[ 1, 2, 3 ]' }
+ { input: [1, 2, 3], output: '[ 1, 2, 3 ]' },
];
// test util.log()
diff --git a/test/parallel/test-util-promisify.js b/test/parallel/test-util-promisify.js
index 70125278d9..7edeb6e493 100644
--- a/test/parallel/test-util-promisify.js
+++ b/test/parallel/test-util-promisify.js
@@ -193,7 +193,7 @@ const stat = promisify(fs.stat);
}),
b.then(assert.fail, function(e) {
assert.strictEqual(err, e);
- })
+ }),
]);
}
diff --git a/test/parallel/test-util-types.js b/test/parallel/test-util-types.js
index ead9bf5469..189d084ee3 100644
--- a/test/parallel/test-util-types.js
+++ b/test/parallel/test-util-types.js
@@ -73,7 +73,7 @@ for (const [ value, _method ] of [
new Number(),
new String(),
Object(Symbol()),
- Object(BigInt(0))
+ Object(BigInt(0)),
].forEach((entry) => assert(types.isBoxedPrimitive(entry)));
{
@@ -194,7 +194,7 @@ for (const [ value, _method ] of [
float32Array, fakeFloat32Array, stealthyFloat32Array,
float64Array, fakeFloat64Array, stealthyFloat64Array,
bigInt64Array, fakeBigInt64Array, stealthyBigInt64Array,
- bigUint64Array, fakeBigUint64Array, stealthyBigUint64Array
+ bigUint64Array, fakeBigUint64Array, stealthyBigUint64Array,
];
const expected = {
@@ -211,7 +211,7 @@ for (const [ value, _method ] of [
float32Array, stealthyFloat32Array,
float64Array, stealthyFloat64Array,
bigInt64Array, stealthyBigInt64Array,
- bigUint64Array, stealthyBigUint64Array
+ bigUint64Array, stealthyBigUint64Array,
],
isTypedArray: [
buffer,
@@ -225,40 +225,40 @@ for (const [ value, _method ] of [
float32Array, stealthyFloat32Array,
float64Array, stealthyFloat64Array,
bigInt64Array, stealthyBigInt64Array,
- bigUint64Array, stealthyBigUint64Array
+ bigUint64Array, stealthyBigUint64Array,
],
isUint8Array: [
- buffer, uint8Array, stealthyUint8Array
+ buffer, uint8Array, stealthyUint8Array,
],
isUint8ClampedArray: [
- uint8ClampedArray, stealthyUint8ClampedArray
+ uint8ClampedArray, stealthyUint8ClampedArray,
],
isUint16Array: [
- uint16Array, stealthyUint16Array
+ uint16Array, stealthyUint16Array,
],
isUint32Array: [
- uint32Array, stealthyUint32Array
+ uint32Array, stealthyUint32Array,
],
isInt8Array: [
- int8Array, stealthyInt8Array
+ int8Array, stealthyInt8Array,
],
isInt16Array: [
- int16Array, stealthyInt16Array
+ int16Array, stealthyInt16Array,
],
isInt32Array: [
- int32Array, stealthyInt32Array
+ int32Array, stealthyInt32Array,
],
isFloat32Array: [
- float32Array, stealthyFloat32Array
+ float32Array, stealthyFloat32Array,
],
isFloat64Array: [
- float64Array, stealthyFloat64Array
+ float64Array, stealthyFloat64Array,
],
isBigInt64Array: [
- bigInt64Array, stealthyBigInt64Array
+ bigInt64Array, stealthyBigInt64Array,
],
isBigUint64Array: [
- bigUint64Array, stealthyBigUint64Array
+ bigUint64Array, stealthyBigUint64Array,
]
};
diff --git a/test/parallel/test-v8-coverage.js b/test/parallel/test-v8-coverage.js
index 2e70ce91fe..ca5301b8bd 100644
--- a/test/parallel/test-v8-coverage.js
+++ b/test/parallel/test-v8-coverage.js
@@ -20,7 +20,7 @@ function nextdir() {
{
const coverageDirectory = path.join(tmpdir.path, nextdir());
const output = spawnSync(process.execPath, [
- require.resolve('../fixtures/v8-coverage/basic')
+ require.resolve('../fixtures/v8-coverage/basic'),
], { env: { ...process.env, NODE_V8_COVERAGE: coverageDirectory } });
if (output.status !== 0) {
console.log(output.stderr.toString());
@@ -39,7 +39,7 @@ function nextdir() {
{
const coverageDirectory = path.join(tmpdir.path, nextdir());
const output = spawnSync(process.execPath, [
- require.resolve('../fixtures/v8-coverage/throw')
+ require.resolve('../fixtures/v8-coverage/throw'),
], { env: { ...process.env, NODE_V8_COVERAGE: coverageDirectory } });
if (output.status !== 1) {
console.log(output.stderr.toString());
@@ -57,7 +57,7 @@ function nextdir() {
{
const coverageDirectory = path.join(tmpdir.path, nextdir());
const output = spawnSync(process.execPath, [
- require.resolve('../fixtures/v8-coverage/exit-1')
+ require.resolve('../fixtures/v8-coverage/exit-1'),
], { env: { ...process.env, NODE_V8_COVERAGE: coverageDirectory } });
if (output.status !== 1) {
console.log(output.stderr.toString());
@@ -76,7 +76,7 @@ function nextdir() {
{
const coverageDirectory = path.join(tmpdir.path, nextdir());
const output = spawnSync(process.execPath, [
- require.resolve('../fixtures/v8-coverage/sigint')
+ require.resolve('../fixtures/v8-coverage/sigint'),
], { env: { ...process.env, NODE_V8_COVERAGE: coverageDirectory } });
if (!common.isWindows) {
if (output.signal !== 'SIGINT') {
@@ -97,7 +97,7 @@ function nextdir() {
{
const coverageDirectory = path.join(tmpdir.path, nextdir());
const output = spawnSync(process.execPath, [
- require.resolve('../fixtures/v8-coverage/spawn-subprocess')
+ require.resolve('../fixtures/v8-coverage/spawn-subprocess'),
], { env: { ...process.env, NODE_V8_COVERAGE: coverageDirectory } });
if (output.status !== 0) {
console.log(output.stderr.toString());
@@ -117,7 +117,7 @@ function nextdir() {
{
const coverageDirectory = path.join(tmpdir.path, nextdir());
const output = spawnSync(process.execPath, [
- require.resolve('../fixtures/v8-coverage/worker')
+ require.resolve('../fixtures/v8-coverage/worker'),
], { env: { ...process.env, NODE_V8_COVERAGE: coverageDirectory } });
if (output.status !== 0) {
console.log(output.stderr.toString());
@@ -137,7 +137,7 @@ function nextdir() {
{
const coverageDirectory = path.join(tmpdir.path, nextdir());
const output = spawnSync(process.execPath, [
- require.resolve('../fixtures/v8-coverage/spawn-subprocess-no-cov')
+ require.resolve('../fixtures/v8-coverage/spawn-subprocess-no-cov'),
], { env: { ...process.env, NODE_V8_COVERAGE: coverageDirectory } });
if (output.status !== 0) {
console.log(output.stderr.toString());
@@ -153,7 +153,7 @@ function nextdir() {
{
const coverageDirectory = path.join(tmpdir.path, nextdir());
const output = spawnSync(process.execPath, [
- require.resolve('../fixtures/v8-coverage/async-hooks')
+ require.resolve('../fixtures/v8-coverage/async-hooks'),
], { env: { ...process.env, NODE_V8_COVERAGE: coverageDirectory } });
if (output.status !== 0) {
console.log(output.stderr.toString());
@@ -172,7 +172,7 @@ function nextdir() {
const coverageDirectory = nextdir();
const absoluteCoverageDirectory = path.join(tmpdir.path, coverageDirectory);
const output = spawnSync(process.execPath, [
- require.resolve('../fixtures/v8-coverage/basic')
+ require.resolve('../fixtures/v8-coverage/basic'),
], {
cwd: tmpdir.path,
env: { ...process.env, NODE_V8_COVERAGE: coverageDirectory }
diff --git a/test/parallel/test-v8-serdes.js b/test/parallel/test-v8-serdes.js
index 9b153739c5..2ccfc9943a 100644
--- a/test/parallel/test-v8-serdes.js
+++ b/test/parallel/test-v8-serdes.js
@@ -21,7 +21,7 @@ const objects = [
undefined,
null,
42,
- circular
+ circular,
];
const hostObject = new (internalBinding('js_stream').JSStream)();
diff --git a/test/parallel/test-v8-stats.js b/test/parallel/test-v8-stats.js
index d79ab84956..2093343859 100644
--- a/test/parallel/test-v8-stats.js
+++ b/test/parallel/test-v8-stats.js
@@ -42,7 +42,7 @@ const expectedHeapSpaces = [
'new_large_object_space',
'new_space',
'old_space',
- 'read_only_space'
+ 'read_only_space',
];
const heapSpaceStatistics = v8.getHeapSpaceStatistics();
const actualHeapSpaceNames = heapSpaceStatistics.map((s) => s.space_name);
diff --git a/test/parallel/test-validators.js b/test/parallel/test-validators.js
index 55c73b2d86..9dbf5f9c45 100644
--- a/test/parallel/test-validators.js
+++ b/test/parallel/test-validators.js
@@ -96,7 +96,7 @@ const invalidArgValueError = {
[
-1, {}, [], false, true,
1, Infinity, -Infinity, NaN,
- undefined, null, 1.1
+ undefined, null, 1.1,
].forEach((i) => assert.throws(() => validateString(i, 'name'), {
code: 'ERR_INVALID_ARG_TYPE'
}));
@@ -106,7 +106,7 @@ const invalidArgValueError = {
[
'a', {}, [], false, true,
undefined, null, '', ' ', '0x',
- '-0x1', '-0o1', '-0b1', '0o', '0b'
+ '-0x1', '-0o1', '-0b1', '0o', '0b',
].forEach((i) => assert.throws(() => validateNumber(i, 'name'), {
code: 'ERR_INVALID_ARG_TYPE'
}));
diff --git a/test/parallel/test-vm-context.js b/test/parallel/test-vm-context.js
index 5226f0e6ac..bcfbb327bf 100644
--- a/test/parallel/test-vm-context.js
+++ b/test/parallel/test-vm-context.js
@@ -82,7 +82,7 @@ const contextifiedObjectError = {
[0.0, nonContextualObjectError],
['', nonContextualObjectError],
[{}, contextifiedObjectError],
- [[], contextifiedObjectError]
+ [[], contextifiedObjectError],
].forEach((e) => {
assert.throws(() => { script.runInContext(e[0]); }, e[1]);
assert.throws(() => { vm.runInContext('', e[0]); }, e[1]);
diff --git a/test/parallel/test-vm-is-context.js b/test/parallel/test-vm-is-context.js
index a47bee7c59..02dc7a596d 100644
--- a/test/parallel/test-vm-is-context.js
+++ b/test/parallel/test-vm-is-context.js
@@ -25,7 +25,7 @@ const assert = require('assert');
const vm = require('vm');
for (const valToTest of [
- 'string', null, undefined, 8.9, Symbol('sym'), true
+ 'string', null, undefined, 8.9, Symbol('sym'), true,
]) {
assert.throws(() => {
vm.isContext(valToTest);
diff --git a/test/parallel/test-vm-module-errors.js b/test/parallel/test-vm-module-errors.js
index 0d5610d140..888250cef8 100644
--- a/test/parallel/test-vm-module-errors.js
+++ b/test/parallel/test-vm-module-errors.js
@@ -24,7 +24,7 @@ async function checkArgType() {
for (const invalidOptions of [
0, 1, null, true, 'str', () => {}, { identifier: 0 }, Symbol.iterator,
- { context: null }, { context: 'hucairz' }, { context: {} }
+ { context: null }, { context: 'hucairz' }, { context: {} },
]) {
assert.throws(() => {
new SourceTextModule('', invalidOptions);
@@ -35,7 +35,7 @@ async function checkArgType() {
}
for (const invalidLinker of [
- 0, 1, undefined, null, true, 'str', {}, Symbol.iterator
+ 0, 1, undefined, null, true, 'str', {}, Symbol.iterator,
]) {
await assert.rejects(async () => {
const m = new SourceTextModule('');
diff --git a/test/parallel/test-vm-module-import-meta.js b/test/parallel/test-vm-module-import-meta.js
index 2972bf548b..4fa285a906 100644
--- a/test/parallel/test-vm-module-import-meta.js
+++ b/test/parallel/test-vm-module-import-meta.js
@@ -25,7 +25,7 @@ async function testBasic() {
async function testInvalid() {
for (const invalidValue of [
- null, {}, 0, Symbol.iterator, [], 'string', false
+ null, {}, 0, Symbol.iterator, [], 'string', false,
]) {
assert.throws(() => {
new SourceTextModule('', {
diff --git a/test/parallel/test-vm-sigint-existing-handler.js b/test/parallel/test-vm-sigint-existing-handler.js
index c6072d29d8..47e5e80c74 100644
--- a/test/parallel/test-vm-sigint-existing-handler.js
+++ b/test/parallel/test-vm-sigint-existing-handler.js
@@ -11,7 +11,7 @@ const spawn = require('child_process').spawn;
const methods = [
'runInThisContext',
- 'runInContext'
+ 'runInContext',
];
if (process.argv[2] === 'child') {
diff --git a/test/parallel/test-vm-syntax-error-message.js b/test/parallel/test-vm-syntax-error-message.js
index 5a16239f56..c49ff6aeb1 100644
--- a/test/parallel/test-vm-syntax-error-message.js
+++ b/test/parallel/test-vm-syntax-error-message.js
@@ -8,7 +8,7 @@ const p = child_process.spawn(process.execPath, [
'vm = require("vm");' +
'context = vm.createContext({});' +
'try { vm.runInContext("throw new Error(\'boo\')", context); } ' +
- 'catch (e) { console.log(e.message); }'
+ 'catch (e) { console.log(e.message); }',
]);
p.stderr.on('data', common.mustNotCall());
diff --git a/test/parallel/test-vm-syntax-error-stderr.js b/test/parallel/test-vm-syntax-error-stderr.js
index e8d48235cf..dd0667c653 100644
--- a/test/parallel/test-vm-syntax-error-stderr.js
+++ b/test/parallel/test-vm-syntax-error-stderr.js
@@ -9,7 +9,7 @@ const wrong_script = fixtures.path('keys/rsa_cert.crt');
const p = child_process.spawn(process.execPath, [
'-e',
'require(process.argv[1]);',
- wrong_script
+ wrong_script,
]);
p.stdout.on('data', common.mustNotCall());
diff --git a/test/parallel/test-webcrypto-derivebits-ecdh.js b/test/parallel/test-webcrypto-derivebits-ecdh.js
index e86217d067..cff174003a 100644
--- a/test/parallel/test-webcrypto-derivebits-ecdh.js
+++ b/test/parallel/test-webcrypto-derivebits-ecdh.js
@@ -53,7 +53,7 @@ async function prepareKeys() {
kTests.map(async ({ namedCurve, size, pkcs8, spki, result }) => {
const [
privateKey,
- publicKey
+ publicKey,
] = await Promise.all([
subtle.importKey(
'pkcs8',
@@ -72,7 +72,7 @@ async function prepareKeys() {
namedCurve
},
true,
- ['deriveKey', 'deriveBits'])
+ ['deriveKey', 'deriveBits']),
]);
keys[namedCurve] = {
privateKey,
diff --git a/test/parallel/test-webcrypto-derivebits-hkdf.js b/test/parallel/test-webcrypto-derivebits-hkdf.js
index f1efbb562b..630c9f790c 100644
--- a/test/parallel/test-webcrypto-derivebits-hkdf.js
+++ b/test/parallel/test-webcrypto-derivebits-hkdf.js
@@ -298,7 +298,7 @@ async function testDeriveBitsBadHash(
},
baseKeys[size], 256), {
message: /Unrecognized name/
- })
+ }),
]);
}
@@ -438,7 +438,7 @@ async function testDeriveKeyBadHash(
keyType,
true,
usages),
- { message: /Unrecognized name/ })
+ { message: /Unrecognized name/ }),
]);
}
diff --git a/test/parallel/test-webcrypto-derivebits-node-dh.js b/test/parallel/test-webcrypto-derivebits-node-dh.js
index 5140c218f0..1498d4fb07 100644
--- a/test/parallel/test-webcrypto-derivebits-node-dh.js
+++ b/test/parallel/test-webcrypto-derivebits-node-dh.js
@@ -77,7 +77,7 @@ const kTestData = {
async function prepareKeys() {
const [
privateKey,
- publicKey
+ publicKey,
] = await Promise.all([
subtle.importKey(
'pkcs8',
@@ -89,7 +89,7 @@ async function prepareKeys() {
'spki',
Buffer.from(kTestData.spki, 'hex'),
{ name: 'NODE-DH' },
- true, [])
+ true, []),
]);
return {
privateKey,
diff --git a/test/parallel/test-webcrypto-derivebits-pbkdf2.js b/test/parallel/test-webcrypto-derivebits-pbkdf2.js
index e14cad287b..94754a195e 100644
--- a/test/parallel/test-webcrypto-derivebits-pbkdf2.js
+++ b/test/parallel/test-webcrypto-derivebits-pbkdf2.js
@@ -481,7 +481,7 @@ async function testDeriveBitsBadHash(
},
baseKeys[size], 256), {
message: /Unrecognized name/
- })
+ }),
]);
}
@@ -568,7 +568,7 @@ async function testDeriveKeyBadHash(
keyType,
true,
usages),
- { message: /Unrecognized name/ })
+ { message: /Unrecognized name/ }),
]);
}
diff --git a/test/parallel/test-webcrypto-derivebits.js b/test/parallel/test-webcrypto-derivebits.js
index 0556b8c15c..707693f642 100644
--- a/test/parallel/test-webcrypto-derivebits.js
+++ b/test/parallel/test-webcrypto-derivebits.js
@@ -19,7 +19,7 @@ const { internalBinding } = require('internal/test/binding');
async function test(namedCurve) {
const [alice, bob] = await Promise.all([
subtle.generateKey({ name: 'ECDH', namedCurve }, true, ['deriveBits']),
- subtle.generateKey({ name: 'ECDH', namedCurve }, true, ['deriveBits'])
+ subtle.generateKey({ name: 'ECDH', namedCurve }, true, ['deriveBits']),
]);
const [secret1, secret2] = await Promise.all([
@@ -28,7 +28,7 @@ const { internalBinding } = require('internal/test/binding');
}, bob.privateKey, 128),
subtle.deriveBits({
name: 'ECDH', namedCurve, public: bob.publicKey
- }, alice.privateKey, 128)
+ }, alice.privateKey, 128),
]);
assert.deepStrictEqual(secret1, secret2);
@@ -61,7 +61,7 @@ const { internalBinding } = require('internal/test/binding');
'41ef21bdeb0fa87b6b6bfa5c54466aa5bf76cdc2685fb' +
'a4408ea5b94c049fe035649b46f92fdc519374'],
['hello', 'there', 'my friend', 'SHA-384', 128,
- 'e36cf2cf943d8f3a88adb80f478745c3']
+ 'e36cf2cf943d8f3a88adb80f478745c3'],
];
const tests = Promise.all(kTests.map((args) => test(...args)));
@@ -93,7 +93,7 @@ const { internalBinding } = require('internal/test/binding');
'ce7678b4cb16fad88098110a83e71f4483ce73203f7a64' +
'719d293280f780f9fafdcf46925c5c0588b3'],
['hello', 'there', 5, 'SHA-384', 128,
- '201509b012c9cd2fbe7ea938f0c509b3']
+ '201509b012c9cd2fbe7ea938f0c509b3'],
];
const tests = Promise.all(kTests.map((args) => test(...args)));
@@ -122,7 +122,7 @@ if (typeof internalBinding('crypto').ScryptJob === 'function') {
'30ddda6feabaac788eb81cc38f496cd5d9a165d320c537ea05331fe720db1061b3a27' +
'b91a8428e49d44078c1fa395cb1c6db336ba44ccb80faa6d74918769374'],
['hello', 'there', 128,
- '30ddda6feabaac788eb81cc38f496cd5']
+ '30ddda6feabaac788eb81cc38f496cd5'],
];
const tests = Promise.all(kTests.map((args) => test(...args)));
diff --git a/test/parallel/test-webcrypto-derivekey-ecdh.js b/test/parallel/test-webcrypto-derivekey-ecdh.js
index f63c8fd64e..bdd9bd7588 100644
--- a/test/parallel/test-webcrypto-derivekey-ecdh.js
+++ b/test/parallel/test-webcrypto-derivekey-ecdh.js
@@ -48,7 +48,7 @@ async function prepareKeys() {
kTests.map(async ({ namedCurve, size, pkcs8, spki, result }) => {
const [
privateKey,
- publicKey
+ publicKey,
] = await Promise.all([
subtle.importKey(
'pkcs8',
@@ -67,7 +67,7 @@ async function prepareKeys() {
namedCurve
},
true,
- ['deriveKey', 'deriveBits'])
+ ['deriveKey', 'deriveBits']),
]);
keys[namedCurve] = {
privateKey,
diff --git a/test/parallel/test-webcrypto-derivekey.js b/test/parallel/test-webcrypto-derivekey.js
index f072fe0168..ee48a61f4a 100644
--- a/test/parallel/test-webcrypto-derivekey.js
+++ b/test/parallel/test-webcrypto-derivekey.js
@@ -19,7 +19,7 @@ const { internalBinding } = require('internal/test/binding');
async function test(namedCurve) {
const [alice, bob] = await Promise.all([
subtle.generateKey({ name: 'ECDH', namedCurve }, true, ['deriveKey']),
- subtle.generateKey({ name: 'ECDH', namedCurve }, true, ['deriveKey'])
+ subtle.generateKey({ name: 'ECDH', namedCurve }, true, ['deriveKey']),
]);
const [secret1, secret2] = await Promise.all([
@@ -34,12 +34,12 @@ const { internalBinding } = require('internal/test/binding');
}, alice.privateKey, {
name: 'AES-CBC',
length: 256
- }, true, ['encrypt'])
+ }, true, ['encrypt']),
]);
const [raw1, raw2] = await Promise.all([
subtle.exportKey('raw', secret1),
- subtle.exportKey('raw', secret2)
+ subtle.exportKey('raw', secret2),
]);
assert.deepStrictEqual(raw1, raw2);
@@ -77,7 +77,7 @@ const { internalBinding } = require('internal/test/binding');
['hello', 'there', 'my friend', 'SHA-256',
'14d93b0ccd99d4f2cbd9fbfe9c830b5b8a43e3e45e32941ef21bdeb0fa87b6b6'],
['hello', 'there', 'my friend', 'SHA-384',
- 'e36cf2cf943d8f3a88adb80f478745c336ac811b1a86d03a7d10eb0b6b52295c']
+ 'e36cf2cf943d8f3a88adb80f478745c336ac811b1a86d03a7d10eb0b6b52295c'],
];
const tests = Promise.all(kTests.map((args) => test(...args)));
@@ -113,7 +113,7 @@ const { internalBinding } = require('internal/test/binding');
['hello', 'there', 10, 'SHA-256',
'f72d1cf4853fffbd16a42751765d11f8dc7939498ee7b7ce7678b4cb16fad880'],
['hello', 'there', 5, 'SHA-384',
- '201509b012c9cd2fbe7ea938f0c509b36ecb140f38bf9130e96923f55f46756d']
+ '201509b012c9cd2fbe7ea938f0c509b36ecb140f38bf9130e96923f55f46756d'],
];
const tests = Promise.all(kTests.map((args) => test(...args)));
@@ -145,7 +145,7 @@ if (typeof internalBinding('crypto').ScryptJob === 'function') {
const kTests = [
['hello', 'there',
- '30ddda6feabaac788eb81cc38f496cd5d9a165d320c537ea05331fe720db1061']
+ '30ddda6feabaac788eb81cc38f496cd5d9a165d320c537ea05331fe720db1061'],
];
const tests = Promise.all(kTests.map((args) => test(...args)));
diff --git a/test/parallel/test-webcrypto-digest.js b/test/parallel/test-webcrypto-digest.js
index 327a7ba32a..78b12ea6a5 100644
--- a/test/parallel/test-webcrypto-digest.js
+++ b/test/parallel/test-webcrypto-digest.js
@@ -14,7 +14,7 @@ const kTests = [
['SHA-1', 'sha1', 160],
['SHA-256', 'sha256', 256],
['SHA-384', 'sha384', 384],
- ['SHA-512', 'sha512', 512]
+ ['SHA-512', 'sha512', 512],
];
// Empty hash just works, not checking result
diff --git a/test/parallel/test-webcrypto-ed25519-ed448.js b/test/parallel/test-webcrypto-ed25519-ed448.js
index 80b9b9ebe9..91e0fb8bf3 100644
--- a/test/parallel/test-webcrypto-ed25519-ed448.js
+++ b/test/parallel/test-webcrypto-ed25519-ed448.js
@@ -50,7 +50,7 @@ async function test1(namedCurve) {
Promise.all([
test1('NODE-ED25519'),
- test1('NODE-ED448')
+ test1('NODE-ED448'),
]).then(common.mustCall());
assert.rejects(
@@ -182,7 +182,7 @@ const testVectors = {
'aa5371b1508f9f4528ecea23c436d94b5e8fcd4f681e30a6ac00a9704a188a03',
'hex'),
crv: 'Ed25519',
- }
+ },
],
'NODE-ED448': [
{
@@ -238,7 +238,7 @@ const testVectors = {
'1068df7254c0cdc129cbe62db2dc957dbb47b51fd3f213fb8698f064774250a5' +
'028961c9bf8ffd973fe5d5c206492b140e00', 'hex'),
crv: 'Ed448',
- }
+ },
]
};
@@ -265,15 +265,15 @@ async function test2(namedCurve) {
namedCurve,
public: true
},
- true, ['verify'])
+ true, ['verify']),
]);
const [
rawKey1,
- rawKey2
+ rawKey2,
] = await Promise.all([
subtle.exportKey('raw', privateKey),
- subtle.exportKey('raw', publicKey)
+ subtle.exportKey('raw', publicKey),
]);
assert.deepStrictEqual(Buffer.from(rawKey1), vector.privateKey);
assert.deepStrictEqual(Buffer.from(rawKey2), vector.publicKey);
@@ -295,10 +295,10 @@ async function test2(namedCurve) {
const [
publicKeyJwk,
- privateKeyJwk
+ privateKeyJwk,
] = await Promise.all([
subtle.exportKey('jwk', publicKey),
- subtle.exportKey('jwk', privateKey)
+ subtle.exportKey('jwk', privateKey),
]);
assert.strictEqual(publicKeyJwk.kty, 'OKP');
assert.strictEqual(privateKeyJwk.kty, 'OKP');
@@ -318,7 +318,7 @@ async function test2(namedCurve) {
Promise.all([
test2('NODE-ED25519'),
- test2('NODE-ED448')
+ test2('NODE-ED448'),
]).then(common.mustCall());
assert.rejects(
diff --git a/test/parallel/test-webcrypto-encrypt-decrypt-rsa.js b/test/parallel/test-webcrypto-encrypt-decrypt-rsa.js
index c75e25bf10..151eebd36c 100644
--- a/test/parallel/test-webcrypto-encrypt-decrypt-rsa.js
+++ b/test/parallel/test-webcrypto-encrypt-decrypt-rsa.js
@@ -23,7 +23,7 @@ async function importVectorKey(
subtle.importKey(
'spki', publicKeyBuffer, { name, hash }, false, publicUsages),
subtle.importKey(
- 'pkcs8', privateKeyBuffer, { name, hash }, false, privateUsages)
+ 'pkcs8', privateKeyBuffer, { name, hash }, false, privateUsages),
]);
return { publicKey, privateKey };
diff --git a/test/parallel/test-webcrypto-export-import-dsa.js b/test/parallel/test-webcrypto-export-import-dsa.js
index e6bcdebc5b..3fddd9dd9c 100644
--- a/test/parallel/test-webcrypto-export-import-dsa.js
+++ b/test/parallel/test-webcrypto-export-import-dsa.js
@@ -14,7 +14,7 @@ const hashes = [
'SHA-1',
'SHA-256',
'SHA-384',
- 'SHA-512'
+ 'SHA-512',
];
const keyData = {
@@ -115,7 +115,7 @@ const testVectors = [
name: 'NODE-DSA',
privateUsages: ['sign'],
publicUsages: ['verify']
- }
+ },
];
(async function() {
diff --git a/test/parallel/test-webcrypto-export-import-ec.js b/test/parallel/test-webcrypto-export-import-ec.js
index 190f7ffda2..31ab2c09cd 100644
--- a/test/parallel/test-webcrypto-export-import-ec.js
+++ b/test/parallel/test-webcrypto-export-import-ec.js
@@ -94,7 +94,7 @@ const testVectors = [
name: 'ECDH',
privateUsages: ['deriveKey', 'deriveBits'],
publicUsages: []
- }
+ },
];
async function testImportSpki({ name, publicUsages }, namedCurve, extractable) {
@@ -173,7 +173,7 @@ async function testImportJwk(
const [
publicKey,
- privateKey
+ privateKey,
] = await Promise.all([
subtle.importKey(
'jwk',
@@ -210,7 +210,7 @@ async function testImportJwk(
},
{ name, namedCurve },
extractable,
- privateUsages)
+ privateUsages),
]);
assert.strictEqual(publicKey.type, 'public');
@@ -228,10 +228,10 @@ async function testImportJwk(
// Test the round trip
const [
pubJwk,
- pvtJwk
+ pvtJwk,
] = await Promise.all([
subtle.exportKey('jwk', publicKey),
- subtle.exportKey('jwk', privateKey)
+ subtle.exportKey('jwk', privateKey),
]);
assert.deepStrictEqual(pubJwk.key_ops, publicUsages);
diff --git a/test/parallel/test-webcrypto-export-import-rsa.js b/test/parallel/test-webcrypto-export-import-rsa.js
index 1caf60f156..29d50aa9dd 100644
--- a/test/parallel/test-webcrypto-export-import-rsa.js
+++ b/test/parallel/test-webcrypto-export-import-rsa.js
@@ -14,7 +14,7 @@ const hashes = [
'SHA-1',
'SHA-256',
'SHA-384',
- 'SHA-512'
+ 'SHA-512',
];
const keyData = {
@@ -389,7 +389,7 @@ async function testImportJwk(
{ ...jwk, alg: `PS${hash.substring(4)}` },
{ name, hash },
extractable,
- privateUsages)
+ privateUsages),
]);
assert.strictEqual(publicKey.type, 'public');
@@ -408,10 +408,10 @@ async function testImportJwk(
if (extractable) {
const [
pubJwk,
- pvtJwk
+ pvtJwk,
] = await Promise.all([
subtle.exportKey('jwk', publicKey),
- subtle.exportKey('jwk', privateKey)
+ subtle.exportKey('jwk', privateKey),
]);
assert.strictEqual(pubJwk.kty, 'RSA');
@@ -460,7 +460,7 @@ const testVectors = [
name: 'RSASSA-PKCS1-V1_5',
privateUsages: ['sign'],
publicUsages: ['verify']
- }
+ },
];
(async function() {
diff --git a/test/parallel/test-webcrypto-export-import.js b/test/parallel/test-webcrypto-export-import.js
index 93d8967f29..d7db433b36 100644
--- a/test/parallel/test-webcrypto-export-import.js
+++ b/test/parallel/test-webcrypto-export-import.js
@@ -153,12 +153,12 @@ const { subtle, getRandomValues } = require('crypto').webcrypto;
spki,
pkcs8,
publicJwk,
- privateJwk
+ privateJwk,
] = await Promise.all([
subtle.exportKey('spki', publicKey),
subtle.exportKey('pkcs8', privateKey),
subtle.exportKey('jwk', publicKey),
- subtle.exportKey('jwk', privateKey)
+ subtle.exportKey('jwk', privateKey),
]);
assert(spki);
@@ -170,7 +170,7 @@ const { subtle, getRandomValues } = require('crypto').webcrypto;
importedSpkiPublicKey,
importedPkcs8PrivateKey,
importedJwkPublicKey,
- importedJwkPrivateKey
+ importedJwkPrivateKey,
] = await Promise.all([
subtle.importKey('spki', spki, {
name: 'RSA-PSS',
@@ -211,12 +211,12 @@ const { subtle, getRandomValues } = require('crypto').webcrypto;
spki,
pkcs8,
publicJwk,
- privateJwk
+ privateJwk,
] = await Promise.all([
subtle.exportKey('spki', publicKey),
subtle.exportKey('pkcs8', privateKey),
subtle.exportKey('jwk', publicKey),
- subtle.exportKey('jwk', privateKey)
+ subtle.exportKey('jwk', privateKey),
]);
assert(spki);
@@ -228,7 +228,7 @@ const { subtle, getRandomValues } = require('crypto').webcrypto;
importedSpkiPublicKey,
importedPkcs8PrivateKey,
importedJwkPublicKey,
- importedJwkPrivateKey
+ importedJwkPrivateKey,
] = await Promise.all([
subtle.importKey('spki', spki, {
name: 'ECDSA',
diff --git a/test/parallel/test-webcrypto-keygen.js b/test/parallel/test-webcrypto-keygen.js
index 4aa3cc4cf2..1e3bcec6be 100644
--- a/test/parallel/test-webcrypto-keygen.js
+++ b/test/parallel/test-webcrypto-keygen.js
@@ -16,7 +16,7 @@ const allUsages = [
'deriveBits',
'deriveKey',
'wrapKey',
- 'unwrapKey'
+ 'unwrapKey',
];
const vectors = {
'AES-CTR': {
@@ -25,7 +25,7 @@ const vectors = {
'encrypt',
'decrypt',
'wrapKey',
- 'unwrapKey'
+ 'unwrapKey',
],
mandatoryUsages: []
},
@@ -35,7 +35,7 @@ const vectors = {
'encrypt',
'decrypt',
'wrapKey',
- 'unwrapKey'
+ 'unwrapKey',
],
mandatoryUsages: []
},
@@ -45,7 +45,7 @@ const vectors = {
'encrypt',
'decrypt',
'wrapKey',
- 'unwrapKey'
+ 'unwrapKey',
],
mandatoryUsages: []
},
@@ -53,7 +53,7 @@ const vectors = {
algorithm: { length: 256 },
usages: [
'wrapKey',
- 'unwrapKey'
+ 'unwrapKey',
],
mandatoryUsages: []
},
@@ -61,7 +61,7 @@ const vectors = {
algorithm: { length: 256, hash: 'SHA-256' },
usages: [
'sign',
- 'verify'
+ 'verify',
],
mandatoryUsages: []
},
@@ -73,7 +73,7 @@ const vectors = {
},
usages: [
'sign',
- 'verify'
+ 'verify',
],
mandatoryUsages: ['sign'],
},
@@ -85,7 +85,7 @@ const vectors = {
},
usages: [
'sign',
- 'verify'
+ 'verify',
],
mandatoryUsages: ['sign']
},
@@ -99,18 +99,18 @@ const vectors = {
'encrypt',
'decrypt',
'wrapKey',
- 'unwrapKey'
+ 'unwrapKey',
],
mandatoryUsages: [
'decrypt',
- 'unwrapKey'
+ 'unwrapKey',
]
},
'ECDSA': {
algorithm: { namedCurve: 'P-521' },
usages: [
'sign',
- 'verify'
+ 'verify',
],
mandatoryUsages: ['sign']
},
@@ -118,22 +118,22 @@ const vectors = {
algorithm: { namedCurve: 'P-521' },
usages: [
'deriveKey',
- 'deriveBits'
+ 'deriveBits',
],
mandatoryUsages: [
'deriveKey',
- 'deriveBits'
+ 'deriveBits',
]
},
'NODE-DSA': {
algorithm: { modulusLength: 1024, hash: 'SHA-256' },
usages: [
'sign',
- 'verify'
+ 'verify',
],
mandatoryUsages: [
'sign',
- 'verify'
+ 'verify',
]
}
};
@@ -170,7 +170,7 @@ const vectors = {
{
name: 'EC',
namedCurve: 'P521'
- }
+ },
].map(async (algorithm) => test(algorithm));
Promise.all(tests).then(common.mustCall());
@@ -273,7 +273,7 @@ const vectors = {
{},
1,
[],
- new Uint32Array(2)
+ new Uint32Array(2),
].map((publicExponent) => {
return assert.rejects(
subtle.generateKey(
@@ -322,7 +322,7 @@ const vectors = {
Buffer.from([1, 0, 1]),
'SHA-256',
['sign'],
- ['verify']
+ ['verify'],
],
[
'RSA-PSS',
@@ -330,7 +330,7 @@ const vectors = {
Buffer.from([1, 0, 1]),
'SHA-512',
['sign'],
- ['verify']
+ ['verify'],
],
[
'RSA-OAEP',
@@ -338,8 +338,8 @@ const vectors = {
Buffer.from([3]),
'SHA-384',
['decrypt', 'unwrapKey'],
- ['encrypt', 'wrapKey']
- ]
+ ['encrypt', 'wrapKey'],
+ ],
];
const tests = kTests.map((args) => test(...args));
@@ -392,26 +392,26 @@ const vectors = {
'ECDSA',
'P-384',
['sign'],
- ['verify']
+ ['verify'],
],
[
'ECDSA',
'P-521',
['sign'],
- ['verify']
+ ['verify'],
],
[
'ECDH',
'P-384',
['deriveKey', 'deriveBits'],
- []
+ [],
],
[
'ECDH',
'P-521',
['deriveKey', 'deriveBits'],
- []
- ]
+ [],
+ ],
];
const tests = kTests.map((args) => test(...args));
@@ -616,8 +616,8 @@ const vectors = {
1024,
'SHA-256',
['sign'],
- ['verify']
- ]
+ ['verify'],
+ ],
];
const tests = kTests.map((args) => test(...args));
diff --git a/test/parallel/test-webcrypto-sign-verify-ecdsa.js b/test/parallel/test-webcrypto-sign-verify-ecdsa.js
index d60b5844cd..2f8f3a2fd2 100644
--- a/test/parallel/test-webcrypto-sign-verify-ecdsa.js
+++ b/test/parallel/test-webcrypto-sign-verify-ecdsa.js
@@ -22,7 +22,7 @@ async function testVerify({ name,
noVerifyPublicKey,
privateKey,
hmacKey,
- rsaKeys
+ rsaKeys,
] = await Promise.all([
subtle.importKey(
'spki',
@@ -54,7 +54,7 @@ async function testVerify({ name,
hash: 'SHA-256',
},
false,
- ['sign'])
+ ['sign']),
]);
assert(await subtle.verify({ name, hash }, publicKey, signature, plaintext));
@@ -171,7 +171,7 @@ async function testSign({ name,
hash: 'SHA-256',
},
false,
- ['sign'])
+ ['sign']),
]);
{
diff --git a/test/parallel/test-webcrypto-sign-verify-hmac.js b/test/parallel/test-webcrypto-sign-verify-hmac.js
index de9a995fad..b0eccad85f 100644
--- a/test/parallel/test-webcrypto-sign-verify-hmac.js
+++ b/test/parallel/test-webcrypto-sign-verify-hmac.js
@@ -18,7 +18,7 @@ async function testVerify({ hash,
const [
key,
noVerifyKey,
- rsaKeys
+ rsaKeys,
] = await Promise.all([
subtle.importKey(
'raw',
@@ -40,7 +40,7 @@ async function testVerify({ hash,
hash: 'SHA-256',
},
false,
- ['sign'])
+ ['sign']),
]);
assert(await subtle.verify({ name, hash }, key, signature, plaintext));
@@ -133,7 +133,7 @@ async function testSign({ hash,
hash: 'SHA-256',
},
false,
- ['sign'])
+ ['sign']),
]);
{
diff --git a/test/parallel/test-webcrypto-sign-verify-node-dsa.js b/test/parallel/test-webcrypto-sign-verify-node-dsa.js
index d14adf4a43..73b006b923 100644
--- a/test/parallel/test-webcrypto-sign-verify-node-dsa.js
+++ b/test/parallel/test-webcrypto-sign-verify-node-dsa.js
@@ -21,7 +21,7 @@ async function testVerify({ algorithm,
noVerifyPublicKey,
privateKey,
hmacKey,
- wrongKeys
+ wrongKeys,
] = await Promise.all([
subtle.importKey(
'spki',
@@ -52,7 +52,7 @@ async function testVerify({ algorithm,
hash: 'SHA-256',
},
false,
- ['sign'])
+ ['sign']),
]);
assert(await subtle.verify(algorithm, publicKey, signature, plaintext));
@@ -168,7 +168,7 @@ async function testSign({
hash: 'SHA-256',
},
false,
- ['sign'])
+ ['sign']),
]);
{
diff --git a/test/parallel/test-webcrypto-sign-verify-rsa.js b/test/parallel/test-webcrypto-sign-verify-rsa.js
index 5c70857d16..60815c5ea0 100644
--- a/test/parallel/test-webcrypto-sign-verify-rsa.js
+++ b/test/parallel/test-webcrypto-sign-verify-rsa.js
@@ -24,7 +24,7 @@ async function testVerify({
noVerifyPublicKey,
privateKey,
hmacKey,
- ecdsaKeys
+ ecdsaKeys,
] = await Promise.all([
subtle.importKey(
'spki',
@@ -55,7 +55,7 @@ async function testVerify({
hash: 'SHA-256',
},
false,
- ['sign'])
+ ['sign']),
]);
assert(await subtle.verify(algorithm, publicKey, signature, plaintext));
@@ -140,7 +140,7 @@ async function testSign({
noSignPrivateKey,
privateKey,
hmacKey,
- ecdsaKeys
+ ecdsaKeys,
] = await Promise.all([
subtle.importKey(
'spki',
@@ -171,7 +171,7 @@ async function testSign({
hash: 'SHA-256',
},
false,
- ['sign'])
+ ['sign']),
]);
{
diff --git a/test/parallel/test-webcrypto-wrap-unwrap.js b/test/parallel/test-webcrypto-wrap-unwrap.js
index d0c4673779..02a6cf3cbb 100644
--- a/test/parallel/test-webcrypto-wrap-unwrap.js
+++ b/test/parallel/test-webcrypto-wrap-unwrap.js
@@ -152,7 +152,7 @@ async function generateKeysToWrap() {
},
usages: ['sign', 'verify'],
pair: false,
- }
+ },
];
const allkeys = await Promise.all(parameters.map(async (params) => {
@@ -173,7 +173,7 @@ async function generateKeysToWrap() {
algorithm: params.algorithm,
usages: params.privateUsages,
key: keys.privateKey,
- }
+ },
];
}
diff --git a/test/parallel/test-webcrypto-x25519-x448.js b/test/parallel/test-webcrypto-x25519-x448.js
index 8668964524..cd079b5fb8 100644
--- a/test/parallel/test-webcrypto-x25519-x448.js
+++ b/test/parallel/test-webcrypto-x25519-x448.js
@@ -200,10 +200,10 @@ async function test2(namedCurve, length) {
const [
publicKeyJwk,
- privateKeyJwk
+ privateKeyJwk,
] = await Promise.all([
subtle.exportKey('jwk', publicKey1),
- subtle.exportKey('jwk', privateKey1)
+ subtle.exportKey('jwk', privateKey1),
]);
assert.strictEqual(publicKeyJwk.kty, 'OKP');
assert.strictEqual(privateKeyJwk.kty, 'OKP');
diff --git a/test/parallel/test-whatwg-encoding-custom-api-basics.js b/test/parallel/test-whatwg-encoding-custom-api-basics.js
index c39bce5d74..71b573a8df 100644
--- a/test/parallel/test-whatwg-encoding-custom-api-basics.js
+++ b/test/parallel/test-whatwg-encoding-custom-api-basics.js
@@ -28,7 +28,7 @@ const sample = 'z\xA2\u6C34\uD834\uDD1E\uF8FF\uDBFF\uDFFD\uFFFE';
0x7A, 0xC2, 0xA2, 0xE6, 0xB0, 0xB4,
0xF0, 0x9D, 0x84, 0x9E, 0xEF, 0xA3,
0xBF, 0xF4, 0x8F, 0xBF, 0xBD, 0xEF,
- 0xBF, 0xBE
+ 0xBF, 0xBE,
];
const encoded = new TextEncoder().encode(string);
assert.deepStrictEqual([].slice.call(encoded), bytes);
@@ -46,7 +46,7 @@ testDecodeSample(
[
0x7A, 0x00, 0xA2, 0x00, 0x34, 0x6C,
0x34, 0xD8, 0x1E, 0xDD, 0xFF, 0xF8,
- 0xFF, 0xDB, 0xFD, 0xDF, 0xFE, 0xFF
+ 0xFF, 0xDB, 0xFD, 0xDF, 0xFE, 0xFF,
]
);
@@ -56,6 +56,6 @@ testDecodeSample(
[
0x7A, 0x00, 0xA2, 0x00, 0x34, 0x6C,
0x34, 0xD8, 0x1E, 0xDD, 0xFF, 0xF8,
- 0xFF, 0xDB, 0xFD, 0xDF, 0xFE, 0xFF
+ 0xFF, 0xDB, 0xFD, 0xDF, 0xFE, 0xFF,
]
);
diff --git a/test/parallel/test-whatwg-encoding-custom-fatal-streaming.js b/test/parallel/test-whatwg-encoding-custom-fatal-streaming.js
index aed0f14ef7..164088270c 100644
--- a/test/parallel/test-whatwg-encoding-custom-fatal-streaming.js
+++ b/test/parallel/test-whatwg-encoding-custom-fatal-streaming.js
@@ -13,7 +13,7 @@ if (!common.hasIntl)
[
{ encoding: 'utf-8', sequence: [0xC0] },
{ encoding: 'utf-16le', sequence: [0x00] },
- { encoding: 'utf-16be', sequence: [0x00] }
+ { encoding: 'utf-16be', sequence: [0x00] },
].forEach((testCase) => {
const data = new Uint8Array([testCase.sequence]);
assert.throws(
diff --git a/test/parallel/test-whatwg-encoding-custom-internals.js b/test/parallel/test-whatwg-encoding-custom-internals.js
index 64bf6abe0d..c810b43b1a 100644
--- a/test/parallel/test-whatwg-encoding-custom-internals.js
+++ b/test/parallel/test-whatwg-encoding-custom-internals.js
@@ -13,16 +13,16 @@ const { getEncodingFromLabel } = require('internal/encoding');
const mappings = {
'utf-8': [
'unicode-1-1-utf-8',
- 'utf8'
+ 'utf8',
],
'utf-16be': [],
'utf-16le': [
- 'utf-16'
+ 'utf-16',
],
'ibm866': [
'866',
'cp866',
- 'csibm866'
+ 'csibm866',
],
'iso-8859-2': [
'csisolatin2',
@@ -32,7 +32,7 @@ const { getEncodingFromLabel } = require('internal/encoding');
'iso_8859-2',
'iso_8859-2:1987',
'l2',
- 'latin2'
+ 'latin2',
],
'iso-8859-3': [
'csisolatin3',
@@ -42,7 +42,7 @@ const { getEncodingFromLabel } = require('internal/encoding');
'iso_8859-3',
'iso_8859-3:1988',
'l3',
- 'latin3'
+ 'latin3',
],
'iso-8859-4': [
'csisolatin4',
@@ -52,7 +52,7 @@ const { getEncodingFromLabel } = require('internal/encoding');
'iso_8859-4',
'iso_8859-4:1988',
'l4',
- 'latin4'
+ 'latin4',
],
'iso-8859-5': [
'csisolatincyrillic',
@@ -61,7 +61,7 @@ const { getEncodingFromLabel } = require('internal/encoding');
'iso8859-5',
'iso88595',
'iso_8859-5',
- 'iso_8859-5:1988'
+ 'iso_8859-5:1988',
],
'iso-8859-6': [
'arabic',
@@ -76,7 +76,7 @@ const { getEncodingFromLabel } = require('internal/encoding');
'iso8859-6',
'iso88596',
'iso_8859-6',
- 'iso_8859-6:1987'
+ 'iso_8859-6:1987',
],
'iso-8859-7': [
'csisolatingreek',
@@ -89,7 +89,7 @@ const { getEncodingFromLabel } = require('internal/encoding');
'iso88597',
'iso_8859-7',
'iso_8859-7:1987',
- 'sun_eu_greek'
+ 'sun_eu_greek',
],
'iso-8859-8': [
'csiso88598e',
@@ -101,11 +101,11 @@ const { getEncodingFromLabel } = require('internal/encoding');
'iso88598',
'iso_8859-8',
'iso_8859-8:1988',
- 'visual'
+ 'visual',
],
'iso-8859-8-i': [
'csiso88598i',
- 'logical'
+ 'logical',
],
'iso-8859-10': [
'csisolatin6',
@@ -113,51 +113,51 @@ const { getEncodingFromLabel } = require('internal/encoding');
'iso8859-10',
'iso885910',
'l6',
- 'latin6'
+ 'latin6',
],
'iso-8859-13': [
'iso8859-13',
- 'iso885913'
+ 'iso885913',
],
'iso-8859-14': [
'iso8859-14',
- 'iso885914'
+ 'iso885914',
],
'iso-8859-15': [
'csisolatin9',
'iso8859-15',
'iso885915',
'iso_8859-15',
- 'l9'
+ 'l9',
],
'koi8-r': [
'cskoi8r',
'koi',
'koi8',
- 'koi8_r'
+ 'koi8_r',
],
'koi8-u': [
- 'koi8-ru'
+ 'koi8-ru',
],
'macintosh': [
'csmacintosh',
'mac',
- 'x-mac-roman'
+ 'x-mac-roman',
],
'windows-874': [
'dos-874',
'iso-8859-11',
'iso8859-11',
'iso885911',
- 'tis-620'
+ 'tis-620',
],
'windows-1250': [
'cp1250',
- 'x-cp1250'
+ 'x-cp1250',
],
'windows-1251': [
'cp1251',
- 'x-cp1251'
+ 'x-cp1251',
],
'windows-1252': [
'ansi_x3.4-1968',
@@ -175,11 +175,11 @@ const { getEncodingFromLabel } = require('internal/encoding');
'l1',
'latin1',
'us-ascii',
- 'x-cp1252'
+ 'x-cp1252',
],
'windows-1253': [
'cp1253',
- 'x-cp1253'
+ 'x-cp1253',
],
'windows-1254': [
'cp1254',
@@ -192,26 +192,26 @@ const { getEncodingFromLabel } = require('internal/encoding');
'iso_8859-9:1989',
'l5',
'latin5',
- 'x-cp1254'
+ 'x-cp1254',
],
'windows-1255': [
'cp1255',
- 'x-cp1255'
+ 'x-cp1255',
],
'windows-1256': [
'cp1256',
- 'x-cp1256'
+ 'x-cp1256',
],
'windows-1257': [
'cp1257',
- 'x-cp1257'
+ 'x-cp1257',
],
'windows-1258': [
'cp1258',
- 'x-cp1258'
+ 'x-cp1258',
],
'x-mac-cyrillic': [
- 'x-mac-ukrainian'
+ 'x-mac-ukrainian',
],
'gbk': [
'chinese',
@@ -221,21 +221,21 @@ const { getEncodingFromLabel } = require('internal/encoding');
'gb_2312',
'gb_2312-80',
'iso-ir-58',
- 'x-gbk'
+ 'x-gbk',
],
'gb18030': [ ],
'big5': [
'big5-hkscs',
'cn-big5',
'csbig5',
- 'x-x-big5'
+ 'x-x-big5',
],
'euc-jp': [
'cseucpkdfmtjapanese',
- 'x-euc-jp'
+ 'x-euc-jp',
],
'iso-2022-jp': [
- 'csiso2022jp'
+ 'csiso2022jp',
],
'shift_jis': [
'csshiftjis',
@@ -244,7 +244,7 @@ const { getEncodingFromLabel } = require('internal/encoding');
'shift-jis',
'sjis',
'windows-31j',
- 'x-sjis'
+ 'x-sjis',
],
'euc-kr': [
' euc-kr \t',
@@ -257,7 +257,7 @@ const { getEncodingFromLabel } = require('internal/encoding');
'ks_c_5601-1989',
'ksc5601',
'ksc_5601',
- 'windows-949'
+ 'windows-949',
]
};
Object.entries(mappings).forEach((i) => {
diff --git a/test/parallel/test-whatwg-encoding-custom-textdecoder-api-invalid-label.js b/test/parallel/test-whatwg-encoding-custom-textdecoder-api-invalid-label.js
index 3323f5b3d1..a701d79a28 100644
--- a/test/parallel/test-whatwg-encoding-custom-textdecoder-api-invalid-label.js
+++ b/test/parallel/test-whatwg-encoding-custom-textdecoder-api-invalid-label.js
@@ -11,7 +11,7 @@ const assert = require('assert');
'utf8',
'utf-16be',
'utf-16le',
- 'utf-16'
+ 'utf-16',
].forEach((i) => {
['\u0000', '\u000b', '\u00a0', '\u2028', '\u2029'].forEach((ws) => {
assert.throws(
diff --git a/test/parallel/test-whatwg-encoding-custom-textdecoder-ignorebom.js b/test/parallel/test-whatwg-encoding-custom-textdecoder-ignorebom.js
index 9f6368dcd5..94fc3318d1 100644
--- a/test/parallel/test-whatwg-encoding-custom-textdecoder-ignorebom.js
+++ b/test/parallel/test-whatwg-encoding-custom-textdecoder-ignorebom.js
@@ -15,7 +15,7 @@ const cases = [
{
encoding: 'utf-16le',
bytes: [0xFF, 0xFE, 0x61, 0x00, 0x62, 0x00, 0x63, 0x00]
- }
+ },
];
cases.forEach((testCase) => {
diff --git a/test/parallel/test-whatwg-encoding-custom-textdecoder-utf16-surrogates.js b/test/parallel/test-whatwg-encoding-custom-textdecoder-utf16-surrogates.js
index f4d9ef8d42..2a8eac5f18 100644
--- a/test/parallel/test-whatwg-encoding-custom-textdecoder-utf16-surrogates.js
+++ b/test/parallel/test-whatwg-encoding-custom-textdecoder-utf16-surrogates.js
@@ -40,7 +40,7 @@ const bad = [
input: [0x00, 0xdc, 0x00, 0xd8],
expected: '\uFFFD\uFFFD',
name: 'swapped surrogate pair'
- }
+ },
];
bad.forEach((t) => {
diff --git a/test/parallel/test-whatwg-url-custom-parsing.js b/test/parallel/test-whatwg-url-custom-parsing.js
index 6d9a9a816e..a07d776d0a 100644
--- a/test/parallel/test-whatwg-url-custom-parsing.js
+++ b/test/parallel/test-whatwg-url-custom-parsing.js
@@ -29,7 +29,7 @@ const typeFailures = [
{ input: new RegExp() },
{ input: 'test', base: null },
{ input: 'http://nodejs.org', base: null },
- { input: () => {} }
+ { input: () => {} },
];
// See https://github.com/w3c/web-platform-tests/pull/10955
diff --git a/test/parallel/test-whatwg-url-custom-properties.js b/test/parallel/test-whatwg-url-custom-properties.js
index cdbd2f6bdd..68e936c6c7 100644
--- a/test/parallel/test-whatwg-url-custom-properties.js
+++ b/test/parallel/test-whatwg-url-custom-properties.js
@@ -140,7 +140,7 @@ assert.strictEqual(url.searchParams, oldParams);
{ expected: 'wss://example.org', url: 'wss://example.org/foo' },
{ expected: 'null', url: 'gopher://gopher.quux.org/1/' },
{ expected: 'null', url: 'file:///tmp/mock/path' },
- { expected: 'null', url: 'npm://nodejs/rules' }
+ { expected: 'null', url: 'npm://nodejs/rules' },
].forEach((test) => {
assert.strictEqual(new URL(test.url).origin, test.expected);
});
diff --git a/test/parallel/test-worker-cleanexit-with-moduleload.js b/test/parallel/test-worker-cleanexit-with-moduleload.js
index 0de9ad71d3..f2e8ad786f 100644
--- a/test/parallel/test-worker-cleanexit-with-moduleload.js
+++ b/test/parallel/test-worker-cleanexit-with-moduleload.js
@@ -10,7 +10,7 @@ const common = require('../common');
const { Worker } = require('worker_threads');
const modules = [ 'fs', 'assert', 'async_hooks', 'buffer', 'child_process',
- 'net', 'http', 'os', 'path', 'v8', 'vm'
+ 'net', 'http', 'os', 'path', 'v8', 'vm',
];
if (common.hasCrypto) {
modules.push('https');
diff --git a/test/parallel/test-worker-debug.js b/test/parallel/test-worker-debug.js
index ba520b1686..758d7acfc3 100644
--- a/test/parallel/test-worker-debug.js
+++ b/test/parallel/test-worker-debug.js
@@ -144,7 +144,7 @@ async function testBasicWorkerDebug(session, post) {
const workerSession = new WorkerSession(session, sessionId);
const contextEventPromises = Promise.all([
waitForEvent(workerSession, 'Runtime.executionContextCreated'),
- waitForEvent(workerSession, 'Runtime.executionContextDestroyed')
+ waitForEvent(workerSession, 'Runtime.executionContextDestroyed'),
]);
const consolePromise = waitForEvent(workerSession, 'Runtime.consoleAPICalled')
.then((notification) => notification.params.args[0].value);
@@ -219,7 +219,7 @@ async function testWaitForDisconnectInWorker(session, post) {
const attached = [
waitForWorkerAttach(session),
- waitForWorkerAttach(sessionWithoutWaiting)
+ waitForWorkerAttach(sessionWithoutWaiting),
];
let worker = null;
diff --git a/test/parallel/test-worker-message-event.js b/test/parallel/test-worker-message-event.js
index bbc2e3b612..8ea08145a1 100644
--- a/test/parallel/test-worker-message-event.js
+++ b/test/parallel/test-worker-message-event.js
@@ -11,42 +11,42 @@ const dummyPort = new MessageChannel().port1;
{
type: 'message', data: null, origin: '',
lastEventId: '', source: null, ports: []
- }
+ },
],
[
['message', { data: undefined, origin: 'foo' }],
{
type: 'message', data: null, origin: 'foo',
lastEventId: '', source: null, ports: []
- }
+ },
],
[
['message', { data: 2, origin: 1, lastEventId: 0 }],
{
type: 'message', data: 2, origin: '1',
lastEventId: '0', source: null, ports: []
- }
+ },
],
[
['message', { lastEventId: 'foo' }],
{
type: 'message', data: null, origin: '',
lastEventId: 'foo', source: null, ports: []
- }
+ },
],
[
['messageerror', { lastEventId: 'foo', source: dummyPort }],
{
type: 'messageerror', data: null, origin: '',
lastEventId: 'foo', source: dummyPort, ports: []
- }
+ },
],
[
['message', { ports: [dummyPort], source: null }],
{
type: 'message', data: null, origin: '',
lastEventId: '', source: null, ports: [dummyPort]
- }
+ },
],
]) {
const ev = new MessageEvent(...args);
diff --git a/test/parallel/test-worker-message-port-multiple-sharedarraybuffers.js b/test/parallel/test-worker-message-port-multiple-sharedarraybuffers.js
index eb68236e4d..efec7f0190 100644
--- a/test/parallel/test-worker-message-port-multiple-sharedarraybuffers.js
+++ b/test/parallel/test-worker-message-port-multiple-sharedarraybuffers.js
@@ -7,7 +7,7 @@ const { MessageChannel } = require('worker_threads');
const obj = [
[ new SharedArrayBuffer(0), new SharedArrayBuffer(1) ],
- [ new SharedArrayBuffer(2), new SharedArrayBuffer(3) ]
+ [ new SharedArrayBuffer(2), new SharedArrayBuffer(3) ],
];
const { port1, port2 } = new MessageChannel();
diff --git a/test/parallel/test-worker-message-port.js b/test/parallel/test-worker-message-port.js
index b5810e726d..ca28f6ccb7 100644
--- a/test/parallel/test-worker-message-port.js
+++ b/test/parallel/test-worker-message-port.js
@@ -180,6 +180,6 @@ const { MessageChannel, MessagePort } = require('worker_threads');
Object.getOwnPropertyNames(MessagePort.prototype).sort(),
[
'close', 'constructor', 'onmessage', 'onmessageerror', 'postMessage',
- 'ref', 'start', 'unref'
+ 'ref', 'start', 'unref',
]);
}
diff --git a/test/parallel/test-worker-process-argv.js b/test/parallel/test-worker-process-argv.js
index ebdebe02ab..0e541c453e 100644
--- a/test/parallel/test-worker-process-argv.js
+++ b/test/parallel/test-worker-process-argv.js
@@ -35,7 +35,7 @@ if (isMainThread) {
`, {
argv: [null, 'foo', 123, Symbol('bar')],
eval: true
- })
+ }),
].forEach((worker) => {
worker.on('exit', common.mustCall((code) => {
assert.strictEqual(code, 0);
diff --git a/test/parallel/test-worker-type-check.js b/test/parallel/test-worker-type-check.js
index 88965f4be4..9a718dfad0 100644
--- a/test/parallel/test-worker-type-check.js
+++ b/test/parallel/test-worker-type-check.js
@@ -13,7 +13,7 @@ const { Worker } = require('worker_threads');
Symbol('test'),
{},
[],
- () => {}
+ () => {},
].forEach((val) => {
assert.throws(
() => new Worker(val),
diff --git a/test/parallel/test-zlib-bytes-read.js b/test/parallel/test-zlib-bytes-read.js
index a7a4e523f7..605281cd3b 100644
--- a/test/parallel/test-zlib-bytes-read.js
+++ b/test/parallel/test-zlib-bytes-read.js
@@ -32,7 +32,7 @@ for (const method of [
['createGzip', 'createUnzip', false],
['createDeflate', 'createInflate', true],
['createDeflateRaw', 'createInflateRaw', true],
- ['createBrotliCompress', 'createBrotliDecompress', true]
+ ['createBrotliCompress', 'createBrotliDecompress', true],
]) {
let compWriter;
let compData = Buffer.alloc(0);
diff --git a/test/parallel/test-zlib-const.js b/test/parallel/test-zlib-const.js
index d25a1ca6be..342c8c712a 100644
--- a/test/parallel/test-zlib-const.js
+++ b/test/parallel/test-zlib-const.js
@@ -7,13 +7,13 @@ const zlib = require('zlib');
assert.strictEqual(zlib.constants.Z_OK, 0,
[
'Expected Z_OK to be 0;',
- `got ${zlib.constants.Z_OK}`
+ `got ${zlib.constants.Z_OK}`,
].join(' '));
zlib.constants.Z_OK = 1;
assert.strictEqual(zlib.constants.Z_OK, 0,
[
'Z_OK should be immutable.',
- `Expected to get 0, got ${zlib.constants.Z_OK}`
+ `Expected to get 0, got ${zlib.constants.Z_OK}`,
].join(' '));
assert.strictEqual(zlib.codes.Z_OK, 0,
@@ -22,17 +22,17 @@ zlib.codes.Z_OK = 1;
assert.strictEqual(zlib.codes.Z_OK, 0,
[
'Z_OK should be immutable.',
- `Expected to get 0, got ${zlib.codes.Z_OK}`
+ `Expected to get 0, got ${zlib.codes.Z_OK}`,
].join(' '));
zlib.codes = { Z_OK: 1 };
assert.strictEqual(zlib.codes.Z_OK, 0,
[
'Z_OK should be immutable.',
- `Expected to get 0, got ${zlib.codes.Z_OK}`
+ `Expected to get 0, got ${zlib.codes.Z_OK}`,
].join(' '));
assert.ok(Object.isFrozen(zlib.codes),
[
'Expected zlib.codes to be frozen, but Object.isFrozen',
- `returned ${Object.isFrozen(zlib.codes)}`
+ `returned ${Object.isFrozen(zlib.codes)}`,
].join(' '));
diff --git a/test/parallel/test-zlib-convenience-methods.js b/test/parallel/test-zlib-convenience-methods.js
index 4757eef42c..01ec7e211b 100644
--- a/test/parallel/test-zlib-convenience-methods.js
+++ b/test/parallel/test-zlib-convenience-methods.js
@@ -45,7 +45,7 @@ for (const [type, expect] of [
['Buffer', expectBuf],
...common.getBufferSources(expectBuf).map((obj) =>
[obj[Symbol.toStringTag], obj]
- )
+ ),
]) {
for (const method of [
['gzip', 'gunzip', 'Gzip', 'Gunzip'],
diff --git a/test/parallel/test-zlib-dictionary.js b/test/parallel/test-zlib-dictionary.js
index 11c8959cc6..49a01d5a03 100644
--- a/test/parallel/test-zlib-dictionary.js
+++ b/test/parallel/test-zlib-dictionary.js
@@ -39,14 +39,14 @@ const spdyDict = Buffer.from([
'ndayTuesdayWednesdayThursdayFridaySaturdaySundayJanFebMarAprMayJunJulAugSe',
'pOctNovDecchunkedtext/htmlimage/pngimage/jpgimage/gifapplication/xmlapplic',
'ation/xhtmltext/plainpublicmax-agecharset=iso-8859-1utf-8gzipdeflateHTTP/1',
- '.1statusversionurl\0'
+ '.1statusversionurl\0',
].join(''));
const input = [
'HTTP/1.1 200 Ok',
'Server: node.js',
'Content-Length: 0',
- ''
+ '',
].join('\r\n');
function basicDictionaryTest(spdyDict) {
diff --git a/test/parallel/test-zlib-empty-buffer.js b/test/parallel/test-zlib-empty-buffer.js
index f225d72e64..27fd1340fd 100644
--- a/test/parallel/test-zlib-empty-buffer.js
+++ b/test/parallel/test-zlib-empty-buffer.js
@@ -14,7 +14,7 @@ const emptyBuffer = Buffer.alloc(0);
[ promisify(zlib.deflateRaw), promisify(zlib.inflateRaw), 'raw' ],
[ promisify(zlib.deflate), promisify(zlib.inflate), 'deflate' ],
[ promisify(zlib.gzip), promisify(zlib.gunzip), 'gzip' ],
- [ promisify(zlib.brotliCompress), promisify(zlib.brotliDecompress), 'br' ]
+ [ promisify(zlib.brotliCompress), promisify(zlib.brotliDecompress), 'br' ],
]) {
const compressed = await compress(emptyBuffer);
const decompressed = await decompress(compressed);
diff --git a/test/parallel/test-zlib-flush-write-sync-interleaved.js b/test/parallel/test-zlib-flush-write-sync-interleaved.js
index 9fed592a34..f8387f4006 100644
--- a/test/parallel/test-zlib-flush-write-sync-interleaved.js
+++ b/test/parallel/test-zlib-flush-write-sync-interleaved.js
@@ -52,6 +52,6 @@ process.on('exit', () => {
'compress end',
{ read: 'abc' },
{ read: 'def' },
- { read: 'ghi' }
+ { read: 'ghi' },
]);
});
diff --git a/test/parallel/test-zlib-from-concatenated-gzip.js b/test/parallel/test-zlib-from-concatenated-gzip.js
index cb9b5dd34c..1de36dacf9 100644
--- a/test/parallel/test-zlib-from-concatenated-gzip.js
+++ b/test/parallel/test-zlib-from-concatenated-gzip.js
@@ -15,7 +15,7 @@ const defEncoded = zlib.gzipSync(def);
const data = Buffer.concat([
abcEncoded,
- defEncoded
+ defEncoded,
]);
assert.strictEqual(zlib.gunzipSync(data).toString(), (abc + def));
@@ -31,7 +31,7 @@ zlib.unzip(data, common.mustSucceed((result) => {
// Multi-member support does not apply to zlib inflate/deflate.
zlib.unzip(Buffer.concat([
zlib.deflateSync('abc'),
- zlib.deflateSync('def')
+ zlib.deflateSync('def'),
]), common.mustSucceed((result) => {
assert.strictEqual(result.toString(), abc);
}));
@@ -75,7 +75,7 @@ fs.createReadStream(pmmFileGz)
// First write: write "abc" + the first bytes of "def"
unzip.write(Buffer.concat([
- abcEncoded, defEncoded.slice(0, offset)
+ abcEncoded, defEncoded.slice(0, offset),
]));
// Write remaining bytes of "def"
diff --git a/test/parallel/test-zlib-from-gzip-with-trailing-garbage.js b/test/parallel/test-zlib-from-gzip-with-trailing-garbage.js
index 14909f4caf..477a6c544f 100644
--- a/test/parallel/test-zlib-from-gzip-with-trailing-garbage.js
+++ b/test/parallel/test-zlib-from-gzip-with-trailing-garbage.js
@@ -9,7 +9,7 @@ const zlib = require('zlib');
let data = Buffer.concat([
zlib.gzipSync('abc'),
zlib.gzipSync('def'),
- Buffer.alloc(10)
+ Buffer.alloc(10),
]);
assert.strictEqual(zlib.gunzipSync(data).toString(), 'abcdef');
@@ -28,7 +28,7 @@ data = Buffer.concat([
zlib.gzipSync('abc'),
zlib.gzipSync('def'),
Buffer.from([0x1f, 0x8b, 0xff, 0xff]),
- Buffer.alloc(10)
+ Buffer.alloc(10),
]);
assert.throws(
@@ -50,7 +50,7 @@ zlib.gunzip(data, common.mustCall((err, result) => {
data = Buffer.concat([
zlib.gzipSync('abc'),
zlib.gzipSync('def'),
- Buffer.from([0x1f, 0x8b, 0xff, 0xff])
+ Buffer.from([0x1f, 0x8b, 0xff, 0xff]),
]);
assert.throws(
diff --git a/test/parallel/test-zlib-invalid-input.js b/test/parallel/test-zlib-invalid-input.js
index eb651be00f..67793984a9 100644
--- a/test/parallel/test-zlib-invalid-input.js
+++ b/test/parallel/test-zlib-invalid-input.js
@@ -30,7 +30,7 @@ const nonStringInputs = [
1,
true,
{ a: 1 },
- ['a']
+ ['a'],
];
// zlib.Unzip classes need to get valid data, or else they'll throw.
@@ -39,7 +39,7 @@ const unzips = [
zlib.Gunzip(),
zlib.Inflate(),
zlib.InflateRaw(),
- zlib.BrotliDecompress()
+ zlib.BrotliDecompress(),
];
nonStringInputs.forEach(common.mustCall((input) => {
diff --git a/test/parallel/test-zlib-not-string-or-buffer.js b/test/parallel/test-zlib-not-string-or-buffer.js
index b7b9a465cb..a0954a0e1e 100644
--- a/test/parallel/test-zlib-not-string-or-buffer.js
+++ b/test/parallel/test-zlib-not-string-or-buffer.js
@@ -15,7 +15,7 @@ const zlib = require('zlib');
0,
1,
[1, 2, 3],
- { foo: 'bar' }
+ { foo: 'bar' },
].forEach((input) => {
assert.throws(
() => zlib.deflateSync(input),
diff --git a/test/parallel/test-zlib-premature-end.js b/test/parallel/test-zlib-premature-end.js
index 9e191c4c88..17446c907d 100644
--- a/test/parallel/test-zlib-premature-end.js
+++ b/test/parallel/test-zlib-premature-end.js
@@ -8,7 +8,7 @@ const input = '0123456789'.repeat(4);
for (const [ compress, decompressor ] of [
[ zlib.deflateRawSync, zlib.createInflateRaw ],
[ zlib.deflateSync, zlib.createInflate ],
- [ zlib.brotliCompressSync, zlib.createBrotliDecompress ]
+ [ zlib.brotliCompressSync, zlib.createBrotliDecompress ],
]) {
const compressed = compress(input);
const trailingData = Buffer.from('not valid compressed data');
@@ -18,7 +18,7 @@ for (const [ compress, decompressor ] of [
(stream) => { stream.write(compressed); stream.write(trailingData); },
(stream) => { stream.write(compressed); stream.end(trailingData); },
(stream) => { stream.write(Buffer.concat([compressed, trailingData])); },
- (stream) => { stream.end(Buffer.concat([compressed, trailingData])); }
+ (stream) => { stream.end(Buffer.concat([compressed, trailingData])); },
]) {
let output = '';
const stream = decompressor();
diff --git a/test/parallel/test-zlib-reset-before-write.js b/test/parallel/test-zlib-reset-before-write.js
index 6b2b107d25..57bd708380 100644
--- a/test/parallel/test-zlib-reset-before-write.js
+++ b/test/parallel/test-zlib-reset-before-write.js
@@ -12,7 +12,7 @@ for (const fn of [
z.reset();
cb();
},
- (z, cb) => z.params(0, zlib.constants.Z_DEFAULT_STRATEGY, cb)
+ (z, cb) => z.params(0, zlib.constants.Z_DEFAULT_STRATEGY, cb),
]) {
const deflate = zlib.createDeflate();
const inflate = zlib.createInflate();
diff --git a/test/parallel/test-zlib-truncated.js b/test/parallel/test-zlib-truncated.js
index 304f76b9da..bcd55923c9 100644
--- a/test/parallel/test-zlib-truncated.js
+++ b/test/parallel/test-zlib-truncated.js
@@ -21,7 +21,7 @@ const errMessage = /unexpected end of file/;
{ comp: 'gzip', decomp: 'gunzip', decompSync: 'gunzipSync' },
{ comp: 'gzip', decomp: 'unzip', decompSync: 'unzipSync' },
{ comp: 'deflate', decomp: 'inflate', decompSync: 'inflateSync' },
- { comp: 'deflateRaw', decomp: 'inflateRaw', decompSync: 'inflateRawSync' }
+ { comp: 'deflateRaw', decomp: 'inflateRaw', decompSync: 'inflateRawSync' },
].forEach(function(methods) {
zlib[methods.comp](inputString, function(err, compressed) {
assert.ifError(err);
diff --git a/test/parallel/test-zlib-unzip-one-byte-chunks.js b/test/parallel/test-zlib-unzip-one-byte-chunks.js
index be3b5dda81..3d3d9c37ff 100644
--- a/test/parallel/test-zlib-unzip-one-byte-chunks.js
+++ b/test/parallel/test-zlib-unzip-one-byte-chunks.js
@@ -5,7 +5,7 @@ const zlib = require('zlib');
const data = Buffer.concat([
zlib.gzipSync('abc'),
- zlib.gzipSync('def')
+ zlib.gzipSync('def'),
]);
const resultBuffers = [];