UNPKG

@apideck/portman

Version:

Port OpenAPI Spec to Postman Collection, with contract & variation tests included

19 lines 905 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.testResponseBodyEmpty = void 0; var application_1 = require("../../application"); var testResponseBodyEmpty = function (pmOperation, _aOperation, config) { var _a; var split = (_a = config === null || config === void 0 ? void 0 : config.separatorSymbol) !== null && _a !== void 0 ? _a : '::'; var pmTest = [ "// Validate if response has empty Body \n", "pm.test(\"[".concat(pmOperation.method.toUpperCase(), "]").concat(split).concat(pmOperation.path), " - Response has empty Body\", function () {\n", " pm.response.to.not.be.withBody;\n", "});\n" ].join(''); (0, application_1.writeOperationTestScript)(pmOperation, pmTest); return pmOperation; }; exports.testResponseBodyEmpty = testResponseBodyEmpty; //# sourceMappingURL=testResponseBodyEmpty.js.map