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) • 616 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const array_schema_1 = require("./array-schema");
describe('checkIsArraySchema', () => {
test.each([
[{ $ref: '#' }, false],
[{ type: 'array', items: { type: 'number' } }, true],
[{ type: 'object' }, false],
[{}, false],
[null, false],
[undefined, false],
[123, false],
['123', false],
[NaN, false],
])('checkIsArraySchema(%s)', (schema, expectedResult) => {
expect((0, array_schema_1.checkIsArraySchema)(schema)).toEqual(expectedResult);
});
});