summaryrefslogtreecommitdiff
path: root/test/parallel/test-worker-process-cwd.js
AgeCommit message (Collapse)Author
2019-07-17test: fix race condition in test-worker-process-cwd.jsRuben Bridgewater
This simplifies the test logic and fixes the race condition that could happen right now. PR-URL: https://github.com/nodejs/node/pull/28609 Refs: https://github.com/nodejs/node/issues/28193 Closes: https://github.com/nodejs/node/pull/28477 Fixes: https://github.com/nodejs/node/issues/27669 Fixes: https://github.com/nodejs/node/issues/28477 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-06-20test: normalize location test-worker-process-cwd.js runs testsSamantha Sample
This change sets the process' directory to __dirname in order to normalize where the test is ran. This addresses the situation that occurs when node is located in the root, and moving up a directory results in the same directory. In that case, an error was thrown because the test interpreted this as a failed directory change. Fixes: https://github.com/nodejs/node/issues/28193 PR-URL: https://github.com/nodejs/node/pull/28271 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-05-13tools: force common be required before any other modulesZYSzys
PR-URL: https://github.com/nodejs/node/pull/27650 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-04-26process: improve cwd performanceRuben Bridgewater
This caches the current working directory and only updates the variable if `process.chdir()` is called. PR-URL: https://github.com/nodejs/node/pull/27224 Reviewed-By: John-David Dalton <john.david.dalton@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Michaƫl Zasso <targos@protonmail.com>