Skip to content

Instantly share code, notes, and snippets.

@btakita
Last active September 7, 2019 11:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save btakita/4718081 to your computer and use it in GitHub Desktop.
Save btakita/4718081 to your computer and use it in GitHub Desktop.
Fix for it & Fast failure output for jasmine-node.
function fixIt() {
GLOBAL.it = function() {
return jasmine.getEnv().it.apply(jasmine.getEnv(), arguments);
}
}
function immediateErrorOutput() {
var theOriginalFail = jasmine.Spec.prototype.fail;
jasmine.Spec.prototype.fail = function (e) {
theOriginalFail.apply(this, arguments);
console.error(e ? jasmine.util.formatException(e) : "Exception");
};
}
fixIt();
immediateErrorOutput();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment