ivr-tester-cli
Version:
CLI for automated testing of IVR call flows
21 lines (20 loc) • 779 B
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.jsonWhenPromptContainsSimilarTo = void 0;
const joi_1 = __importDefault(require("joi"));
const ivr_tester_1 = require("ivr-tester");
const typeValue = "containsSimilarTo";
exports.jsonWhenPromptContainsSimilarTo = {
typeValue,
schema: joi_1.default.object({
type: joi_1.default.valid(typeValue).required(),
value: joi_1.default.string().required(),
threshold: joi_1.default.number().default(0.8).optional(),
}),
converter(json) {
return ivr_tester_1.containsSimilarTo(json.value, json.threshold);
},
};