mirror of
https://github.com/Unleash/unleash.git
synced 2024-11-01 19:07:38 +01:00
20 lines
438 B
TypeScript
20 lines
438 B
TypeScript
|
import { validateSchema } from '../validate';
|
||
|
import { RoleSchema } from './role-schema';
|
||
|
|
||
|
test('roleSchema', () => {
|
||
|
const data: RoleSchema = {
|
||
|
id: 1,
|
||
|
description: '',
|
||
|
name: '',
|
||
|
type: '',
|
||
|
};
|
||
|
|
||
|
expect(
|
||
|
validateSchema('#/components/schemas/roleSchema', data),
|
||
|
).toBeUndefined();
|
||
|
|
||
|
expect(
|
||
|
validateSchema('#/components/schemas/roleSchema', {}),
|
||
|
).toMatchSnapshot();
|
||
|
});
|