UNPKG

@n1k1t/mock-server

Version:

The ultimate toolkit to intercept, transform, and simulate HTTP/WS traffic with type-safe expectations

22 lines 724 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const operator_1 = require("../models/operator"); class ExecExpectationOperator extends operator_1.ExpectationOperator { constructor() { super(...arguments); this.compiled = this.compileExecHandler(this.command, ['utils']); } get tags() { return {}; } async match(context) { const result = await this.compiled('match', context); return typeof result === 'boolean' ? result : true; } async manipulate(context) { await this.compiled('manipulate', context); return context; } } exports.default = ExecExpectationOperator; //# sourceMappingURL=exec.operator.js.map