salix/services/utils/jasmineHelpers.js

9 lines
218 B
JavaScript

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