openapi-codegen-typescript
Version:
OpenApi codegen for generating types an mocks from swagger json file
29 lines (28 loc) • 1.09 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
var getDictionaryValueResultString_1 = require("./getDictionaryValueResultString");
var scenarios = [
{
input: {
description: 'description mocked',
propertyName: 'propertyName mocked',
dictionaryRef: 'dictionaryRef mocked',
value: 'value mocked',
},
output: "/**\n * description mocked\n */\n\tpropertyName mocked: {\n\t[key in dictionaryRef mocked]: value mocked;\n};\n",
},
{
input: {
description: undefined,
propertyName: 'propertyName mocked',
dictionaryRef: 'dictionaryRef mocked',
value: 'value mocked',
},
output: "\tpropertyName mocked: {\n\t[key in dictionaryRef mocked]: value mocked;\n};\n",
},
];
it.each(scenarios)("should return expected string", function (_a) {
var input = _a.input, output = _a.output;
var result = getDictionaryValueResultString_1.getDictionaryValueResultString(input);
expect(result).toBe(output);
});