summaryrefslogtreecommitdiff
path: root/test/parallel
Commit message (Collapse)AuthorAgeFilesLines
* http: decodes url.username and url.password for authorization headerLew Gordon2021-07-281-0/+48
| | | | | | | | | | | | | This change properly decodes the url.username and url.password for the authorization header constructed from the URL object for http(s) requests. Fixes: https://github.com/nodejs/node/issues/31439 PR-URL: https://github.com/nodejs/node/pull/39310 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Robert Nagy <ronagy@icloud.com> Reviewed-By: James M Snell <jasnell@gmail.com>
* stream: convert premature close to AbortErrorRobert Nagy2021-07-283-5/+5
| | | | | | | | | AbortError is a more "web" align alternative to ERR_STREAM_PREMATURE_CLOSE. PR-URL: https://github.com/nodejs/node/pull/39524 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
* crypto: fix `generateKeyPair` with encoding 'jwk'himself652021-07-261-0/+114
| | | | | | | | Fixes: https://github.com/nodejs/node/issues/39205 PR-URL: https://github.com/nodejs/node/pull/39319 Reviewed-By: Filip Skokan <panva.ip@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
* doc,lib,test: rename HKDF 'key' argumentTobias Nießen2021-07-261-2/+2
| | | | | | | | | PR-URL: https://github.com/nodejs/node/pull/39474 Refs: https://github.com/nodejs/node/issues/39471 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Zeyu Yang <himself65@outlook.com> Reviewed-By: Filip Skokan <panva.ip@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
* perf_hooks: web performance timeline compliancelegendecas2021-07-251-3/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All API introduced in this PR are compliant with web [performance-timeline](https://w3c.github.io/performance-timeline) spec. "performance-timeline" is listed as supported web spec in the doc https://nodejs.org/docs/latest/api/perf_hooks.html#perf_hooks_performance_measurement_apis. Changes summary: 1. Add new supported wpt test subsets: user-timing and performance-timeline. 2. Add support for `Performance.getEntries`, `Performance.getEntriesByName` and `Performance.getEntriesByType` to synchronously fetch buffered performance entries. This means the user should invoke `Performance.clearMarks` and `Performance.clearMeasures` to clear buffered entries to prevent from those entries been kept alive forever. 3. Add support (again after https://github.com/nodejs/node/pull/37136) for `buffered` flags for `PerformanceObserver`. 3. Fixes `PerformanceMark` and `PerformanceMeasure` wpt compliance issues. 4. Only user-created performance entries will be buffered globally. This behavior should be compliant with https://w3c.github.io/timing-entrytypes-registry/#registry. With the new ability to fetch user-created performance entries synchronously, the issues raised in https://github.com/nodejs/diagnostics/issues/464#issuecomment-861920116 could also be fixed. PR-URL: https://github.com/nodejs/node/pull/39297 Reviewed-By: James M Snell <jasnell@gmail.com>
* events: allow an event to be dispatched multiple timesLuigi Pinca2021-07-251-0/+30
| | | | | | | | Use a different flag to prevent recursive dispatching. PR-URL: https://github.com/nodejs/node/pull/39395 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
* events: allow the options argument to be nullLuigi Pinca2021-07-251-0/+9
| | | | | | | | | | | Make `EventTarget.prototype.addEventListener()` accept `null` as a valid value for the `options` argument. PR-URL: https://github.com/nodejs/node/pull/39486 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Robert Nagy <ronagy@icloud.com>
* crypto: support Big(U)Int64Array in getRandomValuesMichaël Zasso2021-07-231-22/+24
| | | | | | | | | | | Refs: https://github.com/w3c/webcrypto/issues/255 Fixes: https://github.com/nodejs/node/issues/39442 PR-URL: https://github.com/nodejs/node/pull/39443 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Zeyu Yang <himself65@outlook.com>
* test: update OpenSSL3 error messages for beta-1Daniel Bevenius2021-07-213-9/+6
| | | | | | | | | | | This commit updates error messages that have changed while these tests were disabled. PR-URL: https://github.com/nodejs/node/pull/39437 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
* Revert "test: skip tests for openssl-3.0.0-alpha15"Daniel Bevenius2021-07-2119-57/+0
| | | | | | | | | | This reverts commit 2ff93c8975508736bbc07b98cf84f47d68b47201. PR-URL: https://github.com/nodejs/node/pull/39437 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
* test: remove test-debug-argsMichaël Zasso2021-07-201-10/+0
| | | | | | | | | | It it's not testing anything useful anymore. PR-URL: https://github.com/nodejs/node/pull/38990 Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Robert Nagy <ronagy@icloud.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
* test: update trace events test expectationsMichaël Zasso2021-07-202-2/+2
| | | | | | | | | | | V8 9.2 doesn't emit the "V8.ScriptCompiler" event anymore. Use "V8.GCScavenger" instead. PR-URL: https://github.com/nodejs/node/pull/38990 Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Robert Nagy <ronagy@icloud.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
* stream: add stream.composeRobert Nagy2021-07-192-0/+426
| | | | | | | | | Refs: #32020 PR-URL: https://github.com/nodejs/node/pull/39029 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
* test: add test for WebSocket secret verification in debuggerRich Trott2021-07-181-0/+54
| | | | | | PR-URL: https://github.com/nodejs/node/pull/39357 Refs: https://github.com/nodejs/node-inspect/pull/93 Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
* test: add NumberFormat resolvedOptions testRichard Lau2021-07-181-0/+7
| | | | | | | | | | Add a regression test for NumberFormat resolvedOptions. PR-URL: https://github.com/nodejs/node/pull/39401 Refs: https://github.com/nodejs/node/issues/39050 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de>
* repl: enable --experimental-repl-await /w opt-outhemanth.hm2021-07-162-2/+2
| | | | | | | | | Unflags top-level await for the REPL by enabling --experimental-repl-await by default. Opt-out is supported via --no-experimental-repl-await. PR-URL: https://github.com/nodejs/node/pull/34733 Reviewed-By: Guy Bedford <guybedford@gmail.com>
* fs: add FileHandle.prototype.readableWebStream()James M Snell2021-07-152-0/+92
| | | | | | | | | | | | Adds an experimental `readableWebStream()` method to `FileHandle` that returns a web `ReadableStream` Signed-off-by: James M Snell <jasnell@gmail.com> PR-URL: https://github.com/nodejs/node/pull/39331 Reviewed-By: Robert Nagy <ronagy@icloud.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
* esm: refine ERR_REQUIRE_ESM errorsGuy Bedford2021-07-151-1/+1
| | | | | | | PR-URL: https://github.com/nodejs/node/pull/39175 Reviewed-By: Bradley Farias <bradley.meck@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
* process: add api to enable source-maps programmaticallylegendecas2021-07-151-0/+16
| | | | | | | | | Add `process.setSourceMapsEnabled` to enable source-maps programmatically. PR-URL: https://github.com/nodejs/node/pull/39085 Reviewed-By: Ben Coe <bencoe@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
* stream: add CompressionStream and DecompressionStreamJames M Snell2021-07-141-0/+59
| | | | | | | | Signed-off-by: James M Snell <jasnell@gmail.com> PR-URL: https://github.com/nodejs/node/pull/39348 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
* stream: implement TextEncoderStream and TextDecoderStreamJames M Snell2021-07-141-0/+102
| | | | | | | | | | Experimental as part of the web streams implementation Signed-off-by: James M Snell <jasnell@gmail.com> PR-URL: https://github.com/nodejs/node/pull/39347 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
* stream: forward errored to callbackRobert Nagy2021-07-143-20/+34
| | | | | | | | | Refs: https://github.com/nodejs/node/issues/39356 PR-URL: https://github.com/nodejs/node/pull/39364 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
* stream: add readableDidReadRobert Nagy2021-07-141-0/+24
| | | | | | | | | Adds readableDidRead to streams and applies usage to http, http2 and quic. PR-URL: https://github.com/nodejs/node/pull/36820 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
* stream: implement streams to webstreams adaptersJames M Snell2021-07-137-0/+1297
| | | | | | | | | | Experimental adapters for the webstreams API Signed-off-by: James M Snell <jasnell@gmail.com> PR-URL: https://github.com/nodejs/node/pull/39134 Reviewed-By: Robert Nagy <ronagy@icloud.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
* test: mark test-domain-error-types flakyJames M Snell2021-07-131-0/+2
| | | | | | | | | Refs: https://github.com/nodejs/node/issues/39368 Signed-off-by: James M Snell <jasnell@gmail.com> PR-URL: https://github.com/nodejs/node/pull/39369 Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
* stream: destroy readable on read errorRobert Nagy2021-07-122-73/+8
| | | | | | PR-URL: https://github.com/nodejs/node/pull/39342 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
* stream: cleanup async handlingRobert Nagy2021-07-111-0/+3
| | | | | | | | Cleanup async stream method handling. PR-URL: https://github.com/nodejs/node/pull/39329 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
* stream: don't emit prefinish after error or closeRobert Nagy2021-07-111-0/+21
| | | | | | PR-URL: https://github.com/nodejs/node/pull/39332 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
* tls: move legacy code into own fileRobert Nagy2021-07-111-5/+5
| | | | | | PR-URL: https://github.com/nodejs/node/pull/39333 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
* stream: unify stream utilsRobert Nagy2021-07-112-3/+2
| | | | | | | | | Unify stream helps into utils. PR-URL: https://github.com/nodejs/node/pull/39294 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
* test: move debugger test case to parallelRich Trott2021-07-091-0/+36
| | | | | | | | | Move test case that does not require a predetermined port to parallel. PR-URL: https://github.com/nodejs/node/pull/39300 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Zeyu Yang <himself65@outlook.com>
* repl: processTopLevelAwait fallback error handlingejose192021-07-081-0/+30
| | | | | | PR-URL: https://github.com/nodejs/node/pull/39290 Reviewed-By: Guy Bedford <guybedford@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
* repl: correctly hoist top level await declarationsejose192021-07-081-11/+66
| | | | | | PR-URL: https://github.com/nodejs/node/pull/39265 Reviewed-By: Guy Bedford <guybedford@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
* stream: use finished for async iterationRobert Nagy2021-07-081-1/+1
| | | | | | PR-URL: https://github.com/nodejs/node/pull/39282 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
* errors: remove eager stack generation for node errorsGus Caplan2021-07-071-5/+7
| | | | | | PR-URL: https://github.com/nodejs/node/pull/39182 Reviewed-By: Guy Bedford <guybedford@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
* tty: enable bufferingRobert Nagy2021-07-071-0/+8
| | | | | | | | | | | HWM was set to 0 which would cause e.g. stdout.write(...) to always return false. Refs: https://github.com/nodejs/node/pull/39246 PR-URL: https://github.com/nodejs/node/pull/39253 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
* stream: throw on premature close in Readable[AsyncIterator]Darshan Sen2021-07-051-15/+60
| | | | | | | | | | Fixes: https://github.com/nodejs/node/issues/39086 Signed-off-by: Darshan Sen <raisinten@gmail.com> PR-URL: https://github.com/nodejs/node/pull/39117 Reviewed-By: Robert Nagy <ronagy@icloud.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
* readline: allow completer to rewrite existing inputAnna Henningsen2021-07-051-0/+36
| | | | | | | | | | | | | | | Sometimes, it makes sense for a completer to change the existing input, e.g. by adjusting the casing (imagine a completer that corrects `Number.isNan` to `Number.IsNaN`, for example). This commit allows that in the readline implemention. PR-URL: https://github.com/nodejs/node/pull/39178 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de>
* stream: finished should error on errored streamRobert Nagy2021-07-041-0/+23
| | | | | | | | | | Calling finished before or after a stream has errored or closed should end up with the same behavior. PR-URL: https://github.com/nodejs/node/pull/39235 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
* test: move test-debugger-address to parallelRich Trott2021-07-041-0/+73
| | | | | | | | | The test uses `--inspect=0` so it uses an OS-selected port rather than the default port. This means it can be run in the parallel directory. PR-URL: https://github.com/nodejs/node/pull/39236 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
* repl: ensure correct syntax err for await parsingGuy Bedford2021-07-021-0/+10
| | | | | PR-URL: https://github.com/nodejs/node/pull/39154 Reviewed-By: Anna Henningsen <anna@addaleax.net>
* stream: error Duplex write/read if not writable/readableRobert Nagy2021-07-023-35/+48
| | | | | | | | | | | | | If writable/readable has been explicitly disabled then using a Duplex as writable/readable should fail. Fixes: https://github.com/nodejs/node/issues/34374 PR-URL: https://github.com/nodejs/node/pull/34385 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
* stream: use finished for pumpRobert Nagy2021-07-021-33/+0
| | | | | | | | | Re-use existing compat logic for pump by using finished. PR-URL: https://github.com/nodejs/node/pull/39203 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
* stream: implement WHATWG streamsJames M Snell2021-06-306-0/+2781
| | | | | | | | | | Experimental implementation of the WHATWG streams standard. Signed-off-by: James M Snell <jasnell@gmail.com> PR-URL: https://github.com/nodejs/node/pull/39062 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
* crypto: use compatible ecdh functionShelley Vohr2021-06-301-1/+1
| | | | | | | PR-URL: https://github.com/nodejs/node/pull/39054 Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Tobias Nießen <tniessen@tnie.de>
* errors: don't throw TypeError on missing exportbcoe2021-06-281-0/+19
| | | | | | | | | | | | | | | Logic in module_job.js assumes detailed stack trace from node_errors.cc which is not populated when --enable-source-maps is set. Fixes #38790 PR-URL: https://github.com/nodejs/node/pull/39017 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michael Dawson <midawson@redhat.com>
* bootstrap: load perf_hooks eagerly during bootstrapJoyee Cheung2021-06-281-0/+2
| | | | | | PR-URL: https://github.com/nodejs/node/pull/38971 Refs: https://github.com/nodejs/node/issues/35711 Reviewed-By: James M Snell <jasnell@gmail.com>
* perf_hooks: refactor perf_hooks for snapshot buildingJoyee Cheung2021-06-281-0/+10
| | | | | | | | | | | | | | | | - Move Performance and InternalPerformance to a new lib/internal/perf/performance.js - Move now() getMilestoneTimestamp() into lib/internal/perf/utils.js - Rename lib/internal/perf/perf.js to lib/internal/perf/performance_entry.js - Refresh time origin at startup (this means the time origins could differ between snapshot building time and snapshot creation time) PR-URL: https://github.com/nodejs/node/pull/38971 Refs: https://github.com/nodejs/node/issues/35711 Reviewed-By: James M Snell <jasnell@gmail.com>
* fs: allow empty string for temp directory prefixVoltrex2021-06-261-1/+1
| | | | | | | | | | | | | The `fs` lib module's `mkdtemp()` and `mkdtempSync()` methods were missing a validator, and weren't allowing the empty string as a valid prefix. PR-URL: https://github.com/nodejs/node/pull/39028 Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Zijian Liu <lxxyxzj@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Khaidi Chu <i@2333.moe>
* test: use localhost test instead of connecting to remoteAdam Majer2021-06-261-4/+20
| | | | | | | | | Fixes: https://github.com/nodejs/node/issues/39008 PR-URL: https://github.com/nodejs/node/pull/39011 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Zijian Liu <lxxyxzj@gmail.com>