summaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
2018-10-11src: revert removal of SecureContext `_external` getterVitaly Dyatlov
This `_external` getter is essential for some libs to work: uWebSockets as an example. PR-URL: https://github.com/nodejs/node/pull/21711 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-10-12tls: make StreamWrap work correctly in "drain" callbackOuyang Yadong
When an instance of StreamWrap is shutting down and a "drain" event is emitted, the instance will abort as its `this[kCurrentShutdownRequest]` is already set. The following test will fail before this commit. PR-URL: https://github.com/nodejs/node/pull/23294 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
2018-10-11test: add logging to test-worker-memoryRich Trott
To help troubleshoot CI failures, add some logging. Refs: https://github.com/nodejs/node/issues/23277#issuecomment-428819187 PR-URL: https://github.com/nodejs/node/pull/23418 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2018-10-11vm: pass parsing_context to ScriptCompiler::CompileFunctionInContextDara Hayes
ContextifyContext::CompileFunction in src/node_contextify.cc was incorrectly passing the context variable to ScriptCompiler::CompileFunctionInContext This meant that the parsingContext option in vm.compileFunction was not being applied properly to the compiled function. fixes: https://github.com/nodejs/node/issues/23194 doc: clarify parsingContext option for vm.compileScript test: usage of parsingContext in vm.compileFunction PR-URL: https://github.com/nodejs/node/pull/23206 Fixes: https://github.com/nodejs/node/issues/23194 Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2018-10-11test: add test for a vm indexed propertyconectado
Adds a single test for a vm with an indexed property. PR-URL: https://github.com/nodejs/node/pull/23318 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: John-David Dalton <john.david.dalton@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com>
2018-10-10test: add WPT console-tests-historicalRich Trott
Add WPT console-tests-historical to the test suite. PR-URL: https://github.com/nodejs/node/pull/23340 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-10-10test: separate WPT console test from other testRich Trott
Remove one test from test-whatwg-console-is-a-namespace that is not part of the WPT test. Put it in test-console-self-assign. PR-URL: https://github.com/nodejs/node/pull/23340 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-10-10test: add WPT console-label-conversion testRich Trott
Add console-label-conversion.any.js from WPT to the test suite. PR-URL: https://github.com/nodejs/node/pull/23340 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-10-10test: rename WPT console testRich Trott
test-console-is-a-namespace.js is a WPT Console test. It is the only WPT Console test file that we have that doesn't start with `test-whatwg-`. Rename it to test-whatwg-console-is-a-namespace.js so that WPT tests can be found relatively easily. Just as it is useful to separate the WPT URL tests from our URL tests, it will likely be useful to separate our Console tests from WPT Console tests if we add more WPT Console tests (which I hope we do). PR-URL: https://github.com/nodejs/node/pull/23340 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-10-10test: error when empty buffer is passed to filehandle.read()Masashi Hirano
Added tests to occur error when empty buffer is passed to filehandle.read() to increase coverage. PR-URL: https://github.com/nodejs/node/pull/23250 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-10-10Revert "module: fix inconsistency between load and _findPath"John-David Dalton
This reverts commit 1b92214 from PR #22382. See the discussion at https://github.com/nodejs/citgm/issues/604 PR-URL: https://github.com/nodejs/node/pull/23228 Refs: https://github.com/nodejs/node/pull/22382 Fixes: https://github.com/nodejs/node/issues/4778 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
2018-10-10async_hooks: add missing async_hooks destroys in AsyncResetBastian Krol
This adds missing async_hooks destroy calls for sockets (in _http_agent.js) and HTTP parsers. We need to emit a destroy in AsyncWrap#AsyncReset before assigning a new async_id when the instance has already been in use and is being recycled, because in that case, we have already emitted an init for the "old" async_id. This also removes a duplicated init call for HTTP parser: Each time a new parser was created, AsyncReset was being called via the C++ Parser class constructor (super constructor AsyncWrap) and also via Parser::Reinitialize. PR-URL: https://github.com/nodejs/node/pull/23272 Fixes: https://github.com/nodejs/node/issues/19859 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-10-09util: support BigInt in util.formatMasashi Hirano
`util.format` and `console.log` now support BigInt via the existing format specifiers `%i` and `%d`. PR-URL: https://github.com/nodejs/node/pull/22097 Reviewed-By: Roman Reiss <me@silverwind.io> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-10-09test: remove obsolete domain testJulien Gilli
test-microtask-queue-run-domain.js tests that the behavior of another test, test-microtask-queue-run.js, is still consistent when the core domain module is loaded. This was needed because before the changes in #16222 were merged, the core domain module would replace the function that would call nextTick callbacks with a different implementation. This is no longer the case, and therefore that test is no longer needed. PR-URL: https://github.com/nodejs/node/pull/23343 Reviewed-By: Vladimir de Turckheim <vlad2t@hotmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-10-09test: remove obsolete domain testJulien Gilli
test-microtask-queue-integration-domain.js tests that the behavior of another test, test-microtask-queue-integration.js, is still consistent when the core domain module is loaded. This was needed because before the changes in #16222 were merged, the core domain module would replace the function that would call nextTick callbacks with a different implementation. This is no longer the case, and therefore that test is no longer needed. PR-URL: https://github.com/nodejs/node/pull/23342 Reviewed-By: Vladimir de Turckheim <vlad2t@hotmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-10-09benchmark,doc,lib,src,test,tools: fix typosBrandon Smith
PR-URL: https://github.com/nodejs/node/pull/23302 Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2018-10-09assert: remove internal errorCache propertyRich Trott
The internal assert module exposed an errorCache property solely for testing. It is no longer necessary. Remove it. PR-URL: https://github.com/nodejs/node/pull/23304 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2018-10-09test: remove internal errorCache propertyRich Trott
The internal `assert` modules `errorCache` property is exposed only for testing. The one test that used it is rewritten here to not use it. This has the following advantages: * The test now makes sure that there is an empty cache in a more robust way. Instead of relying on the internal implementation of `errorCache`, it simply spawns a separate process. * One less test using the `--expose-internals` flag. PR-URL: https://github.com/nodejs/node/pull/23304 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2018-10-08icu: make process.binding('icu') internalcjihrig
PR-URL: https://github.com/nodejs/node/pull/23234 Refs: https://github.com/nodejs/node/issues/22160 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Gus Caplan <me@gus.host>
2018-10-08test: remove test-buffer-bindingobj-no-zerofill.jsWeijia Wang
PR-URL: https://github.com/nodejs/node/pull/23234 Refs: https://github.com/nodejs/node/issues/22160 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-10-08streams: refactor ReadableStream asyncIterator creation and a few fixesGus Caplan
Closes: https://github.com/nodejs/node/issues/23041 - Rewrite `ReadableAsyncIterator` class into `ReadableStreamAsyncIteratorPrototype` which contains no constructor and inherits from `%AsyncIteratorPrototype%`. - Rewrite `AsyncIteratorRecord` into dumb function. PR-URL: https://github.com/nodejs/node/pull/23042 Fixes: https://github.com/nodejs/node/issues/23041 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-10-08zlib: simplify flushing mechanismAnna Henningsen
Previously, flushing on zlib streams was implemented through stream 'drain' handlers. This has a number of downsides; in particular, it is complex, and could lead to unpredictable behaviour, since it meant that in a sequence like ```js compressor.write('abc'); compressor.flush(); waitForMoreDataAsynchronously(() => { compressor.write('def'); }); ``` it was not fully deterministic whether the flush happens after the second chunk is written or the first one. This commit replaces this mechanism by one that piggy-backs along the stream’s write queue, using a “special” `Buffer` instance that signals that a flush is currently due. PR-URL: https://github.com/nodejs/node/pull/23186 Reviewed-By: James M Snell <jasnell@gmail.com>
2018-10-08test: remove eslint-disable from fixturesRich Trott
Fixture files are not linted. Remove `eslint-disable` comments from fixture files. PR-URL: https://github.com/nodejs/node/pull/23345 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
2018-10-08test: read() on dir on AIX does not return EISDIRBen Noordhuis
An upcoming change in libuv will remove the artificial EISDIR error. Update the test to reflect that. Refs: https://github.com/libuv/libuv/pull/2025 PR-URL: https://github.com/nodejs/node/pull/23330 Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2018-10-08http2: add RFC 8441 extended connect protocol supportJames M Snell
PR-URL: https://github.com/nodejs/node/pull/23284 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-10-08tls: update test & docs for ArrayBuffer/DataViewBeni von Cheni
In tls module, accept ArrayBuffer/DataView in place of isUint8Array in the source code & related test code in "test-tls-basic-validations.js", per the "tls" item in the checklist of the comment in #1826. PR-URL: https://github.com/nodejs/node/pull/23210 Refs: https://github.com/nodejs/node/issues/1826 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Denys Otrishko <shishugi@gmail.com>
2018-10-07test: add module require tests for certain package.json errorsTom White
test for unusual error cases: verify that module require() falls back to index if package.json names a missing file and throws an error if package.json is unparseable. PR-URL: https://github.com/nodejs/node/pull/23285 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-10-06test: remove flaky designation for testRich Trott
Unreliability for test-trace-events-fs-sync is believed to have been fixed. Remove flaky designation. Ref: https://github.com/nodejs/node/pull/22812 Ref: https://github.com/nodejs/node/issues/21038#issuecomment-421199960 PR-URL: https://github.com/nodejs/node/pull/22856 Refs: https://github.com/nodejs/node/pull/22812 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Weijia Wang <starkwang@126.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Yuta Hiroto <hello@hiroppy.me> Reviewed-By: Refael Ackermann <refack@gmail.com>
2018-10-06vm: add dynamic import supportGus Caplan
PR-URL: https://github.com/nodejs/node/pull/22381 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Guy Bedford <guybedford@gmail.com> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
2018-10-06test: swap arguments in strictEqual()Duarte David
Swap arguments in strictEqual() for parallel/test-buffer-copy. PR-URL: https://github.com/nodejs/node/pull/23204 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-10-05test: remove obsolete domain testJulien Gilli
test-microtask-queue-run-immediate-domain.js tests that the behavior of another test, test-microtask-queue-run-immediate.js, is still consistent when the core domain module is loaded. This was needed because before the changes in https://github.com/nodejs/node/pull/1622 were merged, the core domain module would replace the function that would call nextTick callbacks with a different implementation. This is no longer the case, and as such that test is no longer needed. R-URL: https://github.com/nodejs/node/pull/23252 Refs: https://github.com/nodejs/node/pull/16222 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-10-04dns: deprecate passing falsy hostname to dns.lookupOuyang Yadong
We can `dns.lookup` a falsy `hostname` like `dns.lookup(false)` for the reason of backwards compatibility long before(see #13119 for detail). This behavior is undocumented and seems useless in real world apps. We could also make invalid `hostname` throw in the future and the change might be semver-major. Fixes: https://github.com/nodejs/node/issues/13119 PR-URL: https://github.com/nodejs/node/pull/23173 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Denys Otrishko <shishugi@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-10-04test: add stdin writable regression testAnna Henningsen
Make sure that `process.stdin.write()`, and in particular ending the stream, works. PR-URL: https://github.com/nodejs/node/pull/23053 Reviewed-By: James M Snell <jasnell@gmail.com>
2018-10-04process: allow reading from stdout/stderr socketsAnna Henningsen
Allow reading from stdio streams that are conventionally associated with process output, since this is only convention. This involves disabling the oddness around closing stdio streams. Its purpose is to prevent the file descriptors 0 through 2 from being closed, since doing so can lead to information leaks when new file descriptors are being opened; instead, not doing anything seems like a more reasonable choice. Fixes: https://github.com/nodejs/node/issues/21203 PR-URL: https://github.com/nodejs/node/pull/23053 Reviewed-By: James M Snell <jasnell@gmail.com>
2018-10-04tools: allow input for TTY testsAnna Henningsen
Since faking TTY input is not otherwise fake-able, we need support in the test runner for it. PR-URL: https://github.com/nodejs/node/pull/23053 Reviewed-By: James M Snell <jasnell@gmail.com>
2018-10-04Revert "tty: make _read throw ERR_TTY_WRITABLE_NOT_READABLE"Anna Henningsen
This reverts commit 91eec00ca20a54b1dc010cfc2fb34bc2f39eab6b. Refs: https://github.com/nodejs/node/pull/21654 Refs: https://github.com/nodejs/node/issues/21203 PR-URL: https://github.com/nodejs/node/pull/23053 Reviewed-By: James M Snell <jasnell@gmail.com>
2018-10-04src: name EmbededderGraph edges and use class names for nodesJoyee Cheung
This patch: - Refactors the `MemoryRetainer` API so that the impementer no longer calls `TrackThis()` that sets the size of node on the top of the stack, which may be hard to understand. Instead now they implements `SelfSize()` to provide their self sizes. Also documents the API in the header. - Refactors `MemoryTracker` so it calls `MemoryInfoName()` and `SelfSize()` of `MemoryRetainer` to retrieve info about them, and separate `node_names` and `edge_names` so the edges can be properly named with reference names and the nodes can be named with class names. (Previously the nodes are named with reference names while the edges are all indexed and appear as array elements). - Adds `SET_MEMORY_INFO_NAME()`, `SET_SELF_SIZE()` and `SET_NO_MEMORY_INFO()` convenience macros - Fixes a few `MemoryInfo` calls in some `MemoryRetainers` to track their references properly. - Refactors the heapdump tests to check both node names and edge names, distinguishing between wrapped JS nodes (without prefixes) and embedder wrappers (prefixed with `Node / `). PR-URL: https://github.com/nodejs/node/pull/23072 Reviewed-By: Anna Henningsen <anna@addaleax.net>
2018-10-04test: terminate cluster worker in infinite loopcjihrig
Verify that worker.process.kill() can terminate a cluster worker stuck in an infinite loop. PR-URL: https://github.com/nodejs/node/pull/23165 Fixes: https://github.com/nodejs/node/issues/22703 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2018-10-04test: harden test-gc-http-client-timeoutDenys Otrishko
* decrease number of requests 500 -> 300 * extract 'cb' to a file-local function This should make test more reliable and less resource intensive. PR-URL: https://github.com/nodejs/node/pull/23184 Refs: https://github.com/nodejs/node/issues/23066 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-10-04doc: remove GA trackingBen Noordhuis
The Google Analytics tracking wasn't wholly uncontroversial and hasn't been used in practice. Remove it. PR-URL: https://github.com/nodejs/node/pull/23083 Fixes: https://github.com/nodejs/node/issues/22652 Refs: https://github.com/nodejs/node/pull/6601 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
2018-10-04test: add process.stdin.end() TTY regression testMatteo Collina
PR-URL: https://github.com/nodejs/node/pull/23051 Fixes: https://github.com/nodejs/node/issues/22814 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: George Adams <george.adams@uk.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-10-03src: use JS inheritance for `AsyncWrap`Anna Henningsen
For all classes descending from `AsyncWrap`, use JS inheritance instead of manually adding methods to the individual classes. This allows cleanup of some code around transferring handles over IPC. PR-URL: https://github.com/nodejs/node/pull/23094 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-10-03http2: set nghttp2_option_set_no_closed_streamsDavid Halls
PR-URL: https://github.com/nodejs/node/pull/23134 Fixes: https://github.com/nodejs/node/issues/23116 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-10-03test: add more descriptive err message to assertJosh Broomfield
PR-URL: https://github.com/nodejs/node/pull/23118 Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Rich Trott <rtrott@gmail.com>
2018-10-03test: error when empty buffer is passed to fs.read()shisama
Added tests to occur error when empty buffer is passed to fs.read() to increase coverage. PR-URL: https://github.com/nodejs/node/pull/23141 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-10-03test: fix broken testcjihrig
Approved for fast-tracking by: Rich Trott <rtrott@gmail.com> Colin Ihrig <cjihrig@gmail.com> Refael Ackermann <refack@gmail.com> James M Snell <jasnell@gmail.com> Gireesh Punathil <gpunathi@in.ibm.com> Anna Henningsen <anna@addaleax.net> Sakthipriyan Vairamani <thechargingvolcano@gmail.com> PR-URL: https://github.com/nodejs/node/pull/23232 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2018-10-02util: change util.inspect depth defaultRuben Bridgewater
The current default is not ideal in most use cases. Therefore it is changed to inspect objects to a maximum depth of 20 in case util.inspect is called with it's defaults. The default is kept at 2 when using console.log() and similar in the repl. PR-URL: https://github.com/nodejs/node/pull/17907 Refs: https://github.com/nodejs/node/issues/12693 PR-URL: https://github.com/nodejs/node/pull/22846 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Denys Otrishko <shishugi@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io>
2018-10-02repl: do not swallow errors in nested REPLsRich Trott
For tab completion, a REPLServer instance will sometimes create another REPLServer instance. If a callback is sent to the `.complete()` function and that callback throws an error, it will be swallowed by the nested REPLs domain. Re-throw the error so that processes don't silently exit without any indication of an error (including a status code). Fixes: https://github.com/nodejs/node/issues/21586 PR-URL: https://github.com/nodejs/node/pull/23004 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2018-10-02test: mark some flakesRefael Ackermann
PR-URL: https://github.com/nodejs/node/pull/23208 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-10-02util: handle null prototype on inspectAnto Aravinth
This makes sure the `null` prototype is always detected properly. PR-URL: https://github.com/nodejs/node/pull/22331 Fixes: https://github.com/nodejs/node/issues/22141 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: John-David Dalton <john.david.dalton@gmail.com>