summaryrefslogtreecommitdiff
path: root/test/parallel/test-process-chdir.js
diff options
context:
space:
mode:
authorRuben Bridgewater <ruben@bridgewater.de>2019-04-14 17:34:08 +0200
committerRuben Bridgewater <ruben@bridgewater.de>2019-04-26 18:43:11 +0200
commit1d022e825356dfba9bef2d6f194b9e93d63b726d (patch)
treeb102789e5cdf7c399596b96e3818cbff96f62e89 /test/parallel/test-process-chdir.js
parent55147d7d9939cce1bbc2c8a70ac7ebe03e91e5cf (diff)
downloadandroid-node-v8-1d022e825356dfba9bef2d6f194b9e93d63b726d.tar.gz
android-node-v8-1d022e825356dfba9bef2d6f194b9e93d63b726d.tar.bz2
android-node-v8-1d022e825356dfba9bef2d6f194b9e93d63b726d.zip
process: improve cwd performance
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>
Diffstat (limited to 'test/parallel/test-process-chdir.js')
-rw-r--r--test/parallel/test-process-chdir.js5
1 files changed, 0 insertions, 5 deletions
diff --git a/test/parallel/test-process-chdir.js b/test/parallel/test-process-chdir.js
index 005e17fac2..e66d366fb7 100644
--- a/test/parallel/test-process-chdir.js
+++ b/test/parallel/test-process-chdir.js
@@ -42,8 +42,3 @@ const err = {
};
common.expectsError(function() { process.chdir({}); }, err);
common.expectsError(function() { process.chdir(); }, err);
-
-// Check that our built-in methods do not have a prototype/constructor behaviour
-// if they don't need to. This could be tested for any of our C++ methods.
-assert.strictEqual(process.cwd.prototype, undefined);
-assert.throws(() => new process.cwd(), TypeError);