summaryrefslogtreecommitdiff
path: root/test/parallel/test-repl-tab-complete-crash.js
AgeCommit message (Collapse)Author
2018-08-23test: move common.ArrayStream to separate moduleJames M Snell
In a continuing effort to de-monolithize `require('../common')`, move `common.ArrayStream` out to a separate module that is imported only when it is needed. PR-URL: https://github.com/nodejs/node/pull/22447 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2017-07-03test: remove common.noopRich Trott
This change removes `common.noop` from the Node.js internal testing common module. Over the last few weeks, I've grown to dislike the `common.noop` abstraction. First, new (and experienced) contributors are unaware of it and so it results in a large number of low-value nits on PRs. It also increases the number of things newcomers and infrequent contributors have to be aware of to be effective on the project. Second, it is confusing. Is it a singleton/property or a getter? Which should be expected? This can lead to subtle and hard-to-find bugs. (To my knowledge, none have landed on master. But I also think it's only a matter of time.) Third, the abstraction is low-value in my opinion. What does it really get us? A case could me made that it is without value at all. Lastly, and this is minor, but the abstraction is wordier than not using the abstraction. `common.noop` doesn't save anything over `() => {}`. So, I propose removing it. PR-URL: https://github.com/nodejs/node/pull/12822 Reviewed-By: Teddy Katz <teddy.katz@gmail.com> Reviewed-By: Timothy Gu <timothygu99@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Refael Ackermann <refack@gmail.com>
2017-03-26test: add common.noop, default for common.mustCall()James M Snell
Export a new common.noop no-operation function for general use. Allow using common.mustCall() without a fn argument to simplify test cases. Replace various non-op functions throughout tests with common.noop PR-URL: https://github.com/nodejs/node/pull/12027 Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Teddy Katz <teddy.katz@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
2016-07-26repl: prevent undefined ref in completionEvan Lucas
Fixes: https://github.com/nodejs/node/issues/7716 PR-URL: https://github.com/nodejs/node/pull/7718 Reviewed-By: Anna Henningsen <anna@addaleax.net>
2015-12-25test: remove unused `util` importsRich Trott
A number of tests in `test/parallel` were importing the `util` module via `require()` but not using `util` for anything. This removes those `require()` statements. PR-URL: https://github.com/nodejs/node/pull/4397 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rod Vagg <rod@vagg.org>
2015-11-26test: move ArrayStream to commoncjihrig
A number of REPL tests define the same ArrayStream object. This commit moves the repeated code into common.js. PR-URL: https://github.com/nodejs/node/pull/4027 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-10-21lib: avoid REPL exit on completion errorRich Trott
If a tab completion is attempted on an undefined reference inside of a function, the REPL was exiting without reporting an error or anything else. This change results in the REPL reporting the ReferenceError and continuing. Fixes: https://github.com/nodejs/node/issues/3346 PR-URL: https://github.com/nodejs/node/pull/3358 Reviewed-By: James M Snell <jasnell@gmail.com>