New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove unused variables #3061
Remove unused variables #3061
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Since errorDiff
is only called with false
for the escape
value, why not just remove the parameter entirely and do this?
function errorDiff(err, type) {
var actual = escapeInvisibles(err.actual);
var expected = escapeInvisibles(err.expected);
/* ... */
}
good catch btw--it looks like this variable became useless somewhere around when inline diffs were added |
Thank you for reviewing. Lines 447 to 459 in 9f204ba
|
@38elements thanks! |
* Remove unused variables * Change errorDiff() * Remove escapeInvisibles()
Requirements
The
escape
argument forinlineDiff()
andunifiedDiff()
inBase.list()
is always false.inlineDiff() and unifiedDiff() are only used in
Base.list()
.I think the
escape
argument is unnecessary.mocha/lib/reporters/base.js
Lines 188 to 220 in 9f204ba