diff options
author | Ruben Bridgewater <ruben@bridgewater.de> | 2018-12-13 06:05:41 +0300 |
---|---|---|
committer | Ruben Bridgewater <ruben@bridgewater.de> | 2018-12-18 14:34:08 +0300 |
commit | 3b2698e41f27a1d0c51833dab32bdaa98e6ef8cb (patch) | |
tree | fe05d45f7783ad9b56a8ece0021494138018bf41 /lib/internal/assert.js | |
parent | 0858e5d9d8db085cb83b3f1f3f94ed6b550a7bc5 (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.js | 4 |
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 } ); } |