UNPKG

ivr-tester-cli

Version:

CLI for automated testing of IVR call flows

15 lines (14 loc) 552 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.loadScenarioOption = void 0; const scenarioConverter_1 = require("./json/scenarioConverter"); function loadScenarioOption(options, jsonFileReader) { const jsonContent = jsonFileReader(options.scenarioPath); try { return scenarioConverter_1.scenarioConverter(jsonContent); } catch (error) { throw new Error(`Invalid Scenario '${options.scenarioPath}. Reason: ${error.message}`); } } exports.loadScenarioOption = loadScenarioOption;