Innovenergy_trunk/frontend/node_modules/testcafe/lib/api/wrap-custom-action.js

17 lines
2.2 KiB
JavaScript

"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const test_run_tracker_1 = __importDefault(require("./test-run-tracker"));
const wrap_test_function_1 = __importDefault(require("./wrap-test-function"));
function wrapCustomAction(fn) {
const executor = async function ({ testRun, functionArgs }) {
const markeredfn = test_run_tracker_1.default.addTrackingMarkerToFunction(testRun.id, fn, testRun.controller);
return await markeredfn(...functionArgs);
};
return (0, wrap_test_function_1.default)(fn, executor);
}
exports.default = wrapCustomAction;
module.exports = exports.default;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoid3JhcC1jdXN0b20tYWN0aW9uLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2FwaS93cmFwLWN1c3RvbS1hY3Rpb24udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7QUFBQSwwRUFBZ0Q7QUFDaEQsOEVBQTJGO0FBRTNGLFNBQXdCLGdCQUFnQixDQUFFLEVBQVk7SUFDbEQsTUFBTSxRQUFRLEdBQUcsS0FBSyxXQUFXLEVBQUUsT0FBTyxFQUFFLFlBQVksRUFBcUM7UUFDekYsTUFBTSxVQUFVLEdBQUcsMEJBQWMsQ0FBQywyQkFBMkIsQ0FBQyxPQUFPLENBQUMsRUFBRSxFQUFFLEVBQUUsRUFBRSxPQUFPLENBQUMsVUFBVSxDQUFDLENBQUM7UUFFbEcsT0FBTyxNQUFNLFVBQVUsQ0FBQyxHQUFHLFlBQVksQ0FBQyxDQUFDO0lBQzdDLENBQUMsQ0FBQztJQUVGLE9BQU8sSUFBQSw0QkFBZ0IsRUFBQyxFQUFFLEVBQUUsUUFBUSxDQUFDLENBQUM7QUFDMUMsQ0FBQztBQVJELG1DQVFDIiwic291cmN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