UNPKG

openapi-modifier

Version:

This package allows you to automate the process of modifying OpenAPI specifications by applying a set of predefined rules

22 lines (21 loc) 722 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const each_operation_1 = require("./each-operation"); describe('forEachOperation', () => { test('regular', () => { const fakeLogger = global.createFakeLogger(); const callback = jest.fn(() => { }); const fakeOpenAPIFile = global.createFakeOpenAPIFile({ paths: { '/api/v1/pets': { post: { description: '', responses: {}, }, }, }, }); (0, each_operation_1.forEachOperation)(fakeOpenAPIFile, callback); expect(callback).toBeCalledTimes(1); }); });