UNPKG

openapi-modifier

Version:

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

21 lines (20 loc) 689 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const each_component_1 = require("./each-component"); describe('forEachComponent', () => { test('regular', () => { const fakeLogger = global.createFakeLogger(); const callback = jest.fn(() => { }); const fakeOpenAPIFile = global.createFakeOpenAPIFile({ components: { schemas: { TestComponent: { type: 'string', }, }, }, }); (0, each_component_1.forEachComponent)(fakeOpenAPIFile, callback); expect(callback).toBeCalledTimes(1); }); });