Skip to content

Instantly share code, notes, and snippets.

@hjdivad
Last active December 15, 2015 20:49
Show Gist options
  • Save hjdivad/5321248 to your computer and use it in GitHub Desktop.
Save hjdivad/5321248 to your computer and use it in GitHub Desktop.
Work around jasmine bug when failed expectation is on an Ember object
var originalEmitObject = jasmine.StringPrettyPrinter.prototype.emitObject,
originalHtmlReporterParameters = jasmine.HtmlReporter.parameters;
jasmine.StringPrettyPrinter.prototype.emitObject = function( object ) {
if( Ember.Object.detectInstance( object )){
this.append( object.toString() );
} else {
originalEmitObject.apply( this, arguments );
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment