gauge-ts
Version:
Typescript runner for Gauge
20 lines (19 loc) • 881 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.SpecExecutionStartingProcessor = void 0;
const HookRegistry_1 = require("../models/HookRegistry");
const HookType_1 = require("../models/HookType");
const HookExecutionProcessor_1 = require("./HookExecutionProcessor");
class SpecExecutionStartingProcessor extends HookExecutionProcessor_1.HookExecutionProcessor {
hookType = HookType_1.HookType.BeforeSpec;
getExecutionInfo(hookExecreq) {
const req = hookExecreq;
return req.getCurrentexecutioninfo();
}
getApplicableHooks(hookExecReq) {
const execInfo = this.getExecutionInfo(hookExecReq);
const specInfo = execInfo.getCurrentspec();
return HookRegistry_1.default.get(this.hookType, specInfo.getTagsList());
}
}
exports.SpecExecutionStartingProcessor = SpecExecutionStartingProcessor;