openapi-modifier
Version:
This package allows you to automate the process of modifying OpenAPI specifications by applying a set of predefined rules
19 lines (18 loc) • 622 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const object_schema_1 = require("./object-schema");
describe('checkIsObjectSchema', () => {
test.each([
[{ $ref: '#' }, false],
[{ type: 'array', items: { type: 'number' } }, false],
[{ type: 'object' }, true],
[{}, false],
[null, false],
[undefined, false],
[123, false],
['123', false],
[NaN, false],
])('checkIsObjectSchema(%s)', (schema, expectedResult) => {
expect((0, object_schema_1.checkIsObjectSchema)(schema)).toEqual(expectedResult);
});
});