mirror of
https://github.com/Unleash/unleash.git
synced 2025-03-09 00:18:26 +01:00
37 lines
1.0 KiB
TypeScript
37 lines
1.0 KiB
TypeScript
|
import { validateSchema } from '../validate';
|
||
|
import { AddonsSchema } from './addons-schema';
|
||
|
|
||
|
test('addonsSchema', () => {
|
||
|
const data: AddonsSchema = {
|
||
|
addons: [
|
||
|
{
|
||
|
parameters: { someKey: 'some-value' },
|
||
|
events: ['some-event'],
|
||
|
enabled: true,
|
||
|
provider: 'some-name',
|
||
|
},
|
||
|
],
|
||
|
providers: [
|
||
|
{
|
||
|
name: 'some-name',
|
||
|
displayName: 'some-display-name',
|
||
|
documentationUrl: 'some-url',
|
||
|
description: 'some-description',
|
||
|
parameters: [
|
||
|
{
|
||
|
name: 'some-name',
|
||
|
displayName: 'some-display-name',
|
||
|
type: 'some-type',
|
||
|
required: true,
|
||
|
sensitive: true,
|
||
|
},
|
||
|
],
|
||
|
},
|
||
|
],
|
||
|
};
|
||
|
|
||
|
expect(
|
||
|
validateSchema('#/components/schemas/addonsSchema', data),
|
||
|
).toBeUndefined();
|
||
|
});
|