summaryrefslogtreecommitdiff
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* test: fix suite signalBenjamin Gruenbaum2023-05-171-1/+4
| | | | | | PR-URL: https://github.com/nodejs/node/pull/47800 Fixes: https://github.com/nodejs/node/issues/47882 Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
* crypto: remove default encoding from cipherTobias Nießen2023-05-161-6/+0
| | | | | | Refs: https://github.com/nodejs/node/pull/47182 PR-URL: https://github.com/nodejs/node/pull/47998 Reviewed-By: Filip Skokan <panva.ip@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
* crypto: fix setEngine() when OPENSSL_NO_ENGINE setTobias Nießen2023-05-151-0/+3
| | | | | | | | | | | | | | | When OpenSSL is configured with OPENSSL_NO_ENGINE, setEngine() currently throws an internal error because the C++ binding does not export the relevant function, which causes _setEngine() to be undefined within JS. Instead, match the behavior of tls/secure-context.js and throw the existing error code ERR_CRYPTO_CUSTOM_ENGINE_NOT_SUPPORTED when OpenSSL has been configured with OPENSSL_NO_ENGINE. PR-URL: https://github.com/nodejs/node/pull/47977 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Filip Skokan <panva.ip@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Richard Lau <rlau@redhat.com>
* test_runner: use v8.serialize instead of TAPMoshe Atlow2023-05-158-1925/+201
| | | | | | | | | PR-URL: https://github.com/nodejs/node/pull/47867 Fixes: https://github.com/nodejs/node/issues/44656 Fixes: https://github.com/nodejs/node/issues/47955 Fixes: https://github.com/nodejs/node/issues/47481 Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
* test_runner: add shorthands to `test`Chemi Atlow2023-05-151-6/+2
| | | | | PR-URL: https://github.com/nodejs/node/pull/47909 Fixes: https://github.com/nodejs/node/issues/47897 Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
* url: add value argument to has and delete methodsSankalp Shubham2023-05-141-9/+28
| | | | | | | | | | | | | | | The change aims to add value argument to two methods of URLSearchParams class i.e the has method and the delete method. For has method, if value argument is provided, then use it to check for presence. For delete method, if value argument provided, use it to delete. Fixes: https://github.com/nodejs/node/issues/47883 PR-URL: https://github.com/nodejs/node/pull/47885 Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Debadree Chatterjee <debadree333@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
* esm: do not use `'beforeExit'` on the main threadAntoine du Hamel2023-05-141-17/+4
| | | | | | | PR-URL: https://github.com/nodejs/node/pull/47964 Fixes: https://github.com/nodejs/node/issues/47929 Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
* http: prevent writing to the body when not allowed by HTTP specGerrard Lindsay2023-05-134-8/+30
| | | | | | | PR-URL: https://github.com/nodejs/node/pull/47732 Reviewed-By: Robert Nagy <ronagy@icloud.com> Reviewed-By: Paolo Insogna <paolo@cowtech.it> Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
* vm,lib: refactor microtaskQueue assignment logicXadillaX2023-05-131-8/+6
| | | | | | | | | | | Simplify the assignment of the `microtaskQueue` variable in the `vm` module by replacing the conditional block with a more concise ternary operator. This change improves code readability and maintainability. PR-URL: https://github.com/nodejs/node/pull/47765 Reviewed-By: theanarkh <theratliter@gmail.com> Reviewed-By: Mestery <mestery@protonmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
* worker: support more cases when (de)serializing errorsMoshe Atlow2023-05-121-11/+52
| | | | | | | | | - error.cause is potentially an error, so is now handled recursively - best effort to serialize thrown symbols - handle thrown object with custom inspect PR-URL: https://github.com/nodejs/node/pull/47925 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
* lib: update commentsinkhaha2023-05-121-1/+1
| | | | | | | | | | Rename NODE_MODULE_CONTEXT_AWARE_CPP to NODE_BINDING_CONTEXT_AWARE_CPP. PR-URL: https://github.com/nodejs/node/pull/47884 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
* crypto: remove default encoding from scryptTobias Nießen2023-05-121-8/+2
| | | | | | | | Refs: https://github.com/nodejs/node/pull/47182 PR-URL: https://github.com/nodejs/node/pull/47943 Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Filip Skokan <panva.ip@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
* net: fix family autoselection timeout handlingPaolo Insogna2023-05-111-13/+19
| | | | | PR-URL: https://github.com/nodejs/node/pull/47860 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
* permission: resolve reference to absolute path only for fs permissionDaeyeon Jeong2023-05-111-2/+5
| | | | | | | | | For other candidate permissions, such as "net" or "env", this patch will pass the reference without resolving it to an absolute path. Signed-off-by: Daeyeon Jeong <daeyeon.dev@gmail.com> PR-URL: https://github.com/nodejs/node/pull/47930 Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com> Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
* test_runner: fix ordering of test hooksPhil Nash2023-05-111-4/+4
| | | | | | | | | | | | | For tests with subtests the before hook was being run after the beforeEach hook, which is the opposite to test suites and expectations. Also, a function was being used to close over the after hooks, but at the point it was being run the after hooks were not yet set up. Fixes #47915 PR-URL: https://github.com/nodejs/node/pull/47931 Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
* dns: call `ada::idna::to_ascii` directly from c++Yagiz Nizipli2023-05-103-8/+4
| | | | | | PR-URL: https://github.com/nodejs/node/pull/47920 Fixes: https://github.com/nodejs/performance/issues/77 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
* test_runner: omit inaccessible files from coveragecjihrig2023-05-101-1/+10
| | | | | | | | | If V8 generates code coverage for a file that is later inaccessible to the test runner, then omit that file from the coverage report. PR-URL: https://github.com/nodejs/node/pull/47850 Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: Beth Griggs <bethanyngriggs@gmail.com>
* fs: make readdir recursive algorithm iterativeEthan Arrowood2023-05-102-32/+58
| | | | | | PR-URL: https://github.com/nodejs/node/pull/47650 Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
* module: refactor to use `normalizeRequirableId` in the CJS module loaderDarshan Sen2023-05-082-22/+9
| | | | | | | | | | | | | | | `BuiltinModule.normalizeRequirableId()` was introduced in https://github.com/nodejs/node/pull/47779 to fix a bug in the require function of SEAs and Snapshots, so that built-in modules with the `node:` scheme could be required correctly. This change makes more use of this API instead of `BuiltinModule.canBeRequiredByUsers()` and `BuiltinModule.canBeRequiredWithoutScheme()` to reduce chances of such bugs. Signed-off-by: Darshan Sen <raisinten@gmail.com> PR-URL: https://github.com/nodejs/node/pull/47896 Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
* child_process: use signal.reason in child process abortDebadree Chatterjee2023-05-081-3/+3
| | | | | | | Fixes: https://github.com/nodejs/node/issues/47814 PR-URL: https://github.com/nodejs/node/pull/47817 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com>
* net: only defer _final call when connectingJason Zhang2023-05-081-1/+1
| | | | | | Fixes: https://github.com/nodejs/node/issues/47322 PR-URL: https://github.com/nodejs/node/pull/47385 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Robert Nagy <ronagy@icloud.com>
* buffer: combine checking range of sourceStart in `buf.copy`Deokjin Kim2023-05-071-8/+2
| | | | | | | | Merging 2 checking range of sourceStart into 1. Plus, add test case to increase coverage if sourceStart is greater than length of source. PR-URL: https://github.com/nodejs/node/pull/47758 Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
* url: improve `isURL` detectionYagiz Nizipli2023-05-071-1/+4
| | | | | | | PR-URL: https://github.com/nodejs/node/pull/47886 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Matthew Aitken <maitken033380023@gmail.com> Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
* crypto: fix webcrypto private/secret import with empty usagesFilip Skokan2023-05-071-7/+22
| | | | | | | Refs: #47864 PR-URL: https://github.com/nodejs/node/pull/47877 Refs: https://github.com/nodejs/node/issues/47864 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: James M Snell <jasnell@gmail.com>
* crypto: remove default encoding from pbkdf2Tobias Nießen2023-05-071-8/+2
| | | | | | Refs: https://github.com/nodejs/node/pull/47182 PR-URL: https://github.com/nodejs/node/pull/47869 Reviewed-By: Filip Skokan <panva.ip@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
* src: throw DataCloneError on transfering untransferable objectsChengzhong Wu2023-05-053-4/+24
| | | | | | | | | | | | The HTML StructuredSerializeWithTransfer algorithm defines that when an untransferable object is in the transfer list, a DataCloneError is thrown. An array buffer that is already transferred is also considered as untransferable. PR-URL: https://github.com/nodejs/node/pull/47604 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
* module: block requiring `test/reporters` without schemeMoshe Atlow2023-05-051-0/+1
| | | | | | | | | | | PR-URL: https://github.com/nodejs/node/pull/47831 Fixes: https://github.com/nodejs/node/issues/47828 Reviewed-By: Filip Skokan <panva.ip@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Jacob Smith <jacob@frende.me>
* sea: add option to disable the experimental SEA warningDarshan Sen2023-05-041-2/+2
| | | | | | | | | | Refs: https://github.com/nodejs/single-executable/discussions/60 Signed-off-by: Darshan Sen <raisinten@gmail.com> PR-URL: https://github.com/nodejs/node/pull/47588 Fixes: https://github.com/nodejs/node/issues/47741 Reviewed-By: Michael Dawson <midawson@redhat.com> Reviewed-By: Tierney Cyren <hello@bnb.im> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
* sea: allow requiring core modules with the "node:" prefixDarshan Sen2023-05-043-15/+23
| | | | | | | | | | | | | | | | Previously, the `require()` function exposed to the embedded SEA code was calling the internal `require()` function if the module name belonged to the list of public core modules but the internal `require()` function does not support loading modules with the "node:" prefix, so this change forwards the calls to another `require()` function that supports this. Fixes: https://github.com/nodejs/single-executable/issues/69 Signed-off-by: Darshan Sen <raisinten@gmail.com> PR-URL: https://github.com/nodejs/node/pull/47779 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Michael Dawson <midawson@redhat.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
* path: indicate index of wrong resolve() parametersosoba2023-05-041-3/+2
| | | | | PR-URL: https://github.com/nodejs/node/pull/47660 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Deokjin Kim <deokjin81.kim@gmail.com>
* http: remove internal error in assignSocketMatteo Collina2023-05-022-1/+6
| | | | | | | | | | | Change ServerResponse.assignSocket to not throw an internal error, but an error with its own code. Signed-off-by: Matteo Collina <hello@matteocollina.com> PR-URL: https://github.com/nodejs/node/pull/47723 Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com> Reviewed-By: Robert Nagy <ronagy@icloud.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de>
* tools: fix jsdoc lintMoshe Atlow2023-05-0215-31/+0
| | | | | | | | | | PR-URL: https://github.com/nodejs/node/pull/47789 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Mestery <mestery@protonmail.com>
* url: reduce revokeObjectURL cpp callsYagiz Nizipli2023-04-301-16/+3
| | | | | PR-URL: https://github.com/nodejs/node/pull/47728 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Debadree Chatterjee <debadree333@gmail.com>
* v8: fix ERR_NOT_BUILDING_SNAPSHOT is not a constructorChengzhong Wu2023-04-291-2/+4
| | | | | PR-URL: https://github.com/nodejs/node/pull/47721 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de>
* assert: deprecate callTrackerMoshe Atlow2023-04-291-2/+2
| | | | | | | PR-URL: https://github.com/nodejs/node/pull/47740 Fixes: https://github.com/nodejs/node/issues/47492 Reviewed-By: Erick Wendel <erick.workspace@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
* src: replace idna functions with ada::idnaYagiz Nizipli2023-04-281-2/+2
| | | | | | Co-authored-by: Daniel Lemire <daniel@lemire.me> PR-URL: https://github.com/nodejs/node/pull/47735 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
* test_runner: support combining coverage reportscjihrig2023-04-281-14/+142
| | | | | | | | | | This commit adds support for combining code coverage reports in the test runner. This allows coverage to be collected for child processes, and by extension, the test runner CLI. PR-URL: https://github.com/nodejs/node/pull/47686 Fixes: https://github.com/nodejs/node/issues/47669 Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
* stream: prevent pipeline hang with generator functionsDebadree Chatterjee2023-04-271-2/+1
| | | | | | | Fixes: https://github.com/nodejs/node/issues/47708 PR-URL: https://github.com/nodejs/node/pull/47712 Reviewed-By: Robert Nagy <ronagy@icloud.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Feng Yu <F3n67u@outlook.com>
* dns: expose getDefaultResultOrderbtea2023-04-263-0/+9
| | | | | | PR-URL: https://github.com/nodejs/node/pull/46973 Fixes: https://github.com/nodejs/node/issues/46919 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Paolo Insogna <paolo@cowtech.it>
* tls: accept SecureContext object in server.addContext()HinataKah02023-04-261-2/+4
| | | | | | | | | | | Do not call tls.createSecureContext() if the context provided is already an instance of tls.SecureContext. Fixes: https://github.com/nodejs/node/issues/47408 PR-URL: https://github.com/nodejs/node/pull/47570 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
* test_runner: remove no-op validationcjihrig2023-04-251-1/+1
| | | | | | | | | | | | The code already checks if testNamePatterns is an array, and converts it to an array if it is not. PR-URL: https://github.com/nodejs/node/pull/47687 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: Debadree Chatterjee <debadree333@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Deokjin Kim <deokjin81.kim@gmail.com>
* test_runner: fix test runner concurrencyMoshe Atlow2023-04-244-16/+24
| | | | | | | | | PR-URL: https://github.com/nodejs/node/pull/47675 Fixes: https://github.com/nodejs/node/issues/47365 Fixes: https://github.com/nodejs/node/issues/47696 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
* test_runner: fix test countingMoshe Atlow2023-04-244-18/+9
| | | | | | | | | PR-URL: https://github.com/nodejs/node/pull/47675 Fixes: https://github.com/nodejs/node/issues/47365 Fixes: https://github.com/nodejs/node/issues/47696 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
* esm: rename `URLCanParse` to be consistentAntoine du Hamel2023-04-242-5/+5
| | | | | | | | | | PR-URL: https://github.com/nodejs/node/pull/47668 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Jacob Smith <jacob@frende.me> Reviewed-By: Matthew Aitken <maitken033380023@gmail.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
* http: add highWaterMark opt in http.createServerHinataKah02023-04-244-6/+22
| | | | | | | | | | | Add highWaterMark option when creating a new HTTP server. This option will override the default (readable|writable) highWaterMark values on sockets created. Fixes: https://github.com/nodejs/node/issues/46606 PR-URL: https://github.com/nodejs/node/pull/47405 Reviewed-By: Robert Nagy <ronagy@icloud.com> Reviewed-By: Paolo Insogna <paolo@cowtech.it> Reviewed-By: Debadree Chatterjee <debadree333@gmail.com>
* lib: improve esm resolve performanceYagiz Nizipli2023-04-231-22/+16
| | | | | | | | | | | | PR-URL: https://github.com/nodejs/node/pull/46652 Refs: https://github.com/nodejs/performance/issues/39 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Erick Wendel <erick.workspace@gmail.com> Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
* test_runner: fix nested hooksMoshe Atlow2023-04-231-17/+14
| | | | | | PR-URL: https://github.com/nodejs/node/pull/47648 Fixes: https://github.com/nodejs/node/issues/47643 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
* test_runner: add testNamePatterns to run apiatlowChemi2023-04-231-7/+32
| | | | | | | | | Accept a `testNamePatterns` value in the `run` fn, and drill those patterns to the spawned processes. PR-URL: https://github.com/nodejs/node/pull/47648 Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
* test_runner: support coverage of unnamed functionscjihrig2023-04-231-2/+2
| | | | | | | | | | This commit updates the code coverage logic to skip the first function in a file (which does not correspond to an actual function) instead of skipping all functions without a name. PR-URL: https://github.com/nodejs/node/pull/47652 Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
* test_runner: move coverage collection to root.postRun()cjihrig2023-04-232-4/+6
| | | | | | | | | | | | | | | | This commit moves code coverage collection from the test harness exit handler to the postRun() function of the root test. This is necessary preparatory work for supporting code coverage with --test. The reason is that --test is implemented on top of run(), and that function calls the root test's postRun() function, which outputs the test summary. This happens before the harness exit handler. PR-URL: https://github.com/nodejs/node/pull/47651 Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>