UNPKG

unleash-server

Version:

Unleash is an enterprise ready feature flag service. It provides different strategies for handling feature flags.

29 lines 960 B
import { validateSchema } from '../validate.js'; test('strategySchema', () => { const data = { description: '', title: '', name: '', displayName: '', editable: false, deprecated: false, parameters: [ { name: '', type: '', description: '', required: true, }, ], }; expect(validateSchema('#/components/schemas/strategySchema', data)).toBeUndefined(); // allow null descriptions expect(validateSchema('#/components/schemas/strategySchema', { ...data, description: null, })).toBeUndefined(); expect(validateSchema('#/components/schemas/strategySchema', {})).toMatchSnapshot(); const { title, ...noTitle } = { ...data }; expect(validateSchema('#/components/schemas/strategySchema', noTitle)).toBeUndefined(); }); //# sourceMappingURL=strategy-schema.test.js.map