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>2019-05-13 16:14:03 +0300
committerRuben Bridgewater <ruben@bridgewater.de>2019-05-16 13:58:38 +0300
commit35fc1b4e9668b2e085e06e3a97afd97c825db2c0 (patch)
tree332282545907bc3838d7bb2306168e5e5d867937 /lib/internal/assert
parent5b26609e5a706c43bdf0683d09db154b93c8c479 (diff)
assert: remove unused code
Those two operators are not used. PR-URL: https://github.com/nodejs/node/pull/27676 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Diffstat (limited to 'lib/internal/assert')
-rw-r--r--lib/internal/assert/assertion_error.js5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/internal/assert/assertion_error.js b/lib/internal/assert/assertion_error.js
index b0226e879ad..7b62fca0352 100644
--- a/lib/internal/assert/assertion_error.js
+++ b/lib/internal/assert/assertion_error.js
@@ -375,8 +375,7 @@ class AssertionError extends Error {
let res = inspectValue(actual);
let other = inspectValue(expected);
const knownOperators = kReadableOperator[operator];
- if ((operator === 'notDeepEqual' || operator === 'notEqual') &&
- res === other) {
+ if (operator === 'notDeepEqual' && res === other) {
res = `${knownOperators}\n\n${res}`;
if (res.length > 1024) {
res = `${res.slice(0, 1021)}...`;
@@ -389,7 +388,7 @@ class AssertionError extends Error {
if (other.length > 512) {
other = `${other.slice(0, 509)}...`;
}
- if (operator === 'deepEqual' || operator === 'equal') {
+ if (operator === 'deepEqual') {
const eq = operator === 'deepEqual' ? 'deep-equal' : 'equal';
res = `${knownOperators}\n\n${res}\n\nshould loosely ${eq}\n\n`;
} else {