Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuben Bridgewater <ruben@bridgewater.de>2018-12-13 06:05:41 +0300
committerRuben Bridgewater <ruben@bridgewater.de>2018-12-18 14:34:08 +0300
commit3b2698e41f27a1d0c51833dab32bdaa98e6ef8cb (patch)
treefe05d45f7783ad9b56a8ece0021494138018bf41 /lib/internal/assert.js
parent0858e5d9d8db085cb83b3f1f3f94ed6b550a7bc5 (diff)
assert: inspect getters
While asserting two objects the descriptor is not taken into account. Therefore getters will be triggered as such. This makes sure they are also highlighted in the error message instead of potentially looking identical while the return value of the getter is actually different. PR-URL: https://github.com/nodejs/node/pull/25004 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Michaƫl Zasso <targos@protonmail.com>
Diffstat (limited to 'lib/internal/assert.js')
-rw-r--r--lib/internal/assert.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/internal/assert.js b/lib/internal/assert.js
index 829f6663191..29769fc5617 100644
--- a/lib/internal/assert.js
+++ b/lib/internal/assert.js
@@ -56,7 +56,9 @@ function inspectValue(val) {
breakLength: Infinity,
// Assert does not detect proxies currently.
showProxy: false,
- sorted: true
+ sorted: true,
+ // Inspect getters as we also check them when comparing entries.
+ getters: true
}
);
}