jest-allure2-reporter
Version:
Idiomatic Jest reporter for Allure Framework
13 lines • 646 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.hijackFunction = void 0;
const thruMaybePromise_1 = require("./thruMaybePromise");
const wrapFunction_1 = require("./wrapFunction");
const hijackFunction = (function_, callback) => {
return (0, wrapFunction_1.wrapFunction)(function_, function hijackFunctionWrapper(...arguments_) {
const result = Reflect.apply(function_, this, arguments_);
return (0, thruMaybePromise_1.thruMaybePromise)(result, (value) => (callback(value, arguments_), value));
});
};
exports.hijackFunction = hijackFunction;
//# sourceMappingURL=hijackFunction.js.map