mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-06 00:07:44 +01:00
24 lines
620 B
TypeScript
24 lines
620 B
TypeScript
|
import { validateSchema } from '../validate';
|
||
|
import { ContextFieldSchema } from './context-field-schema';
|
||
|
|
||
|
test('contextFieldSchema', () => {
|
||
|
const data: ContextFieldSchema = {
|
||
|
name: '',
|
||
|
description: '',
|
||
|
stickiness: false,
|
||
|
sortOrder: 0,
|
||
|
createdAt: '2022-01-01T00:00:00.000Z',
|
||
|
legalValues: [],
|
||
|
};
|
||
|
|
||
|
expect(
|
||
|
validateSchema('#/components/schemas/contextFieldSchema', data),
|
||
|
).toBeUndefined();
|
||
|
});
|
||
|
|
||
|
test('contextFieldSchema empty', () => {
|
||
|
expect(
|
||
|
validateSchema('#/components/schemas/contextFieldSchema', {}),
|
||
|
).toMatchSnapshot();
|
||
|
});
|