mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-11 00:08:30 +01:00
19 lines
564 B
TypeScript
19 lines
564 B
TypeScript
|
import { validateSchema } from '../validate';
|
||
|
import { ProfileSchema } from './profile-schema';
|
||
|
import { RoleName } from '../../types/model';
|
||
|
|
||
|
test('profileSchema', () => {
|
||
|
const data: ProfileSchema = {
|
||
|
rootRole: 'Editor' as RoleName,
|
||
|
projects: ['default', 'secretproject'],
|
||
|
features: [
|
||
|
{ name: 'firstFeature', project: 'default' },
|
||
|
{ name: 'secondFeature', project: 'secretproject' },
|
||
|
],
|
||
|
};
|
||
|
|
||
|
expect(
|
||
|
validateSchema('#/components/schemas/profileSchema', data),
|
||
|
).toBeUndefined();
|
||
|
});
|