1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-06 00:07:44 +01:00
unleash.unleash/src/lib/openapi/spec/ui-config-schema.test.ts
olav 7ee8892704
fix: add missing environments field to uiConfigSchema (#1736)
* fix: add missing environment field to uiConfigSchema

* refactor: avoid throwing when unleash-server is a dependency in dev mode
2022-06-21 09:34:07 +02:00

26 lines
643 B
TypeScript

import { validateSchema } from '../validate';
import { UiConfigSchema } from './ui-config-schema';
test('uiConfigSchema', () => {
const data: UiConfigSchema = {
slogan: 'a',
version: 'a',
unleashUrl: 'a',
baseUriPath: 'a',
environment: 'a',
disablePasswordAuth: false,
segmentValuesLimit: 0,
strategySegmentsLimit: 0,
versionInfo: {
current: {},
latest: {},
isLatest: true,
instanceId: 'a',
},
};
expect(
validateSchema('#/components/schemas/uiConfigSchema', data),
).toBeUndefined();
});