salix/services/utils/jasmineHelpers.js

9 lines
218 B
JavaScript
Raw Normal View History

module.exports.catchErrors = function(done) {
return error => {
if (error instanceof Error) {
return done.fail(error.stack);
}
return done.fail(JSON.stringify(error));
};
};