1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-11-01 19:07:38 +01:00
unleash.unleash/src/lib/openapi/spec/strategy-schema.test.ts

29 lines
685 B
TypeScript
Raw Normal View History

import { validateSchema } from '../validate';
import { StrategySchema } from './strategy-schema';
test('strategySchema', () => {
const data: StrategySchema = {
description: '',
name: '',
displayName: '',
editable: false,
deprecated: false,
parameters: [
{
name: '',
type: '',
description: '',
required: true,
},
],
};
expect(
validateSchema('#/components/schemas/strategySchema', data),
).toBeUndefined();
expect(
validateSchema('#/components/schemas/strategySchema', {}),
).toMatchSnapshot();
});