fix(spec) Never report errors in spec mode

This commit is contained in:
Juan Tejada 2017-02-09 13:10:56 -08:00
parent eca7f2cd6d
commit ba464e9f21

View file

@ -59,7 +59,8 @@ module.exports = ErrorLogger = (function() {
/////////////////////////// PUBLIC METHODS //////////////////////////
/////////////////////////////////////////////////////////////////////
ErrorLogger.prototype.reportError = function(error, extra) {
ErrorLogger.prototype.reportError = function(error, extra = {}) {
if (this.inSpecMode) { return }
if (!error) { error = {stack: ""} }
this._appendLog(error.stack)
if (extra) { this._appendLog(extra) }