summaryrefslogtreecommitdiff
path: root/test/parallel/test-repl-context.js
AgeCommit message (Collapse)Author
2019-07-17repl: fix some repl context issuesRuben Bridgewater
This partially fixes contexts like `{} instanceof Object === false` in the REPL. This does not fix all cases, since it's something fundamental from the REPL's design that things like these can happen. Refs: https://github.com/nodejs/node/issues/27859 PR-URL: https://github.com/nodejs/node/pull/28561 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2019-03-27benchmark,doc,lib: capitalize more commentsRuben Bridgewater
PR-URL: https://github.com/nodejs/node/pull/26849 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
2019-03-10benchmark,doc,lib,test: capitalize commentsRuben Bridgewater
PR-URL: https://github.com/nodejs/node/pull/26483 Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
2019-02-28benchmark,doc,lib,test: capitalize commentsRuben Bridgewater
This updates a lot of comments. PR-URL: https://github.com/nodejs/node/pull/26223 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
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>
2018-05-19repl: make console, module and require non-enumerableRuben Bridgewater
This aligns these globals with the regular context. PR-URL: https://github.com/nodejs/node/pull/20717 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2018-02-12Revert "repl: refactor tests to not rely on timing"Ruben Bridgewater
This reverts commit de848ac1e0483327a2ce8716c3f8567eaeacb660. The commit broke multiline repl. PR-URL: https://github.com/nodejs/node/pull/18715 Refs: https://github.com/nodejs/node/pull/17828 Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-02-10repl: refactor tests to not rely on timingBradley Farias
Tests relying on synchronous timing have been migrated to use events. PR-URL: https://github.com/nodejs/node/pull/17828 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
2017-08-30repl: remove REPLServer.createContext side effectsLance Ball
The internal method `REPLServer.createContext()` had unexpected side effects. When called, the value for the `underscoreAssigned` and `lines` properties were reset. This change ensures that those properties are not modified when a context is created. Fixes: https://github.com/nodejs/node/issues/14226 Refs: https://github.com/nodejs/node/issues/7619 PR-URL: https://github.com/nodejs/node/pull/14331 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2017-04-13test: add second argument to assert.throwsMichaël Zasso
This adds RegExp or error constructor arguments to the remaining places where it is missing in preparation for the commit that will enforce the presence of at least two arguments. PR-URL: https://github.com/nodejs/node/pull/12270 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
2016-09-20tools: add eslint rule prefer-assert-methodsDany Shaanan
PR-URL: https://github.com/nodejs/node/pull/8622 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Yorkie Liu <yorkiefixer@gmail.com> Reviewed-By: Jackson Tian <shvyo1987@gmail.com> Reviewed-By: Johan Bergström <bugs@bergstroem.nu> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Teddy Katz <teddy.katz@gmail.com>
2016-06-27repl: Enable tab completion for global propertiesLance Ball
When `useGlobal` is false, tab completion in the repl does not enumerate global properties. Instead of just setting these properties blindly on the global context, e.g. context[prop] = global[prop] Use `Object.defineProperty` and the property descriptor found on `global` for the new property in `context`. Also addresses a previously unnoticed issue where `console` is writable when `useGlobal` is false. If the binary has been built with `./configure --without-intl` then the `Intl` builtin type will not be available in a repl runtime. Check for this in the test. Fixes: https://github.com/nodejs/node/issues/7353 PR-URL: https://github.com/nodejs/node/pull/7369 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>