salix/services/utils/jasmineHelpers.js

9 lines
218 B
JavaScript

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