mirror of
https://github.com/Unleash/unleash.git
synced 2025-02-04 00:18:01 +01:00
27 lines
606 B
TypeScript
27 lines
606 B
TypeScript
import { validateSchema } from '../validate';
|
|
import { TokenUserSchema } from './token-user-schema';
|
|
|
|
test('tokenUserSchema', () => {
|
|
const data: TokenUserSchema = {
|
|
id: 0,
|
|
name: '',
|
|
email: '',
|
|
createdBy: '',
|
|
token: '',
|
|
role: {
|
|
id: 0,
|
|
description: '',
|
|
name: '',
|
|
type: '',
|
|
},
|
|
};
|
|
|
|
expect(
|
|
validateSchema('#/components/schemas/tokenUserSchema', data),
|
|
).toBeUndefined();
|
|
|
|
expect(
|
|
validateSchema('#/components/schemas/tokenUserSchema', {}),
|
|
).toMatchSnapshot();
|
|
});
|