Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fixup: use suggestion
  • Loading branch information
BridgeAR committed Apr 4, 2018
commit 47ab44c8910623fbb081602f5a1e30ca8f1b21ed
14 changes: 13 additions & 1 deletion lib/internal/errors.js
Original file line number Diff line number Diff line change
Expand Up @@ -386,9 +386,21 @@ class AssertionError extends Error {
this.actual = actual;
this.expected = expected;
this.operator = operator;
this.rawMessage = lazyInternalUtil().removeColors(this.message);
Error.captureStackTrace(this, stackStartFn);
}

get rawMessage() {
return lazyInternalUtil().removeColors(this.message);
}

set rawMessage(value) {
Object.defineProperty(this, 'rawMessage', {
value,
enumerable: true,
writable: true,
configurable: true
});
}
}

// This is defined here instead of using the assert module to avoid a
Expand Down