mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-31 00:16:47 +01:00
013efac46b
We love all open-source Unleash users. in 2022 we built the [segment capability](https://docs.getunleash.io/reference/segments) (v4.13) as an enterprise feature, simplify life for our customers. Now it is time to contribute it to the world 🌏 --------- Co-authored-by: Thomas Heartman <thomas@getunleash.io>
37 lines
980 B
TypeScript
37 lines
980 B
TypeScript
import { validateSchema } from '../validate';
|
|
import { UpdateFeatureStrategySegmentsSchema } from './update-feature-strategy-segments-schema';
|
|
|
|
test('updateFeatureStrategySegmentsSchema schema', () => {
|
|
const data: UpdateFeatureStrategySegmentsSchema = {
|
|
strategyId: '1',
|
|
segmentIds: [1, 2],
|
|
projectId: 'default',
|
|
environmentId: 'default',
|
|
additional: 'property',
|
|
};
|
|
|
|
expect(
|
|
validateSchema(
|
|
'#/components/schemas/updateFeatureStrategySegmentsSchema',
|
|
data,
|
|
),
|
|
).toBeUndefined();
|
|
|
|
expect(
|
|
validateSchema(
|
|
'#/components/schemas/updateFeatureStrategySegmentsSchema',
|
|
{},
|
|
),
|
|
).toMatchSnapshot();
|
|
|
|
expect(
|
|
validateSchema(
|
|
'#/components/schemas/updateFeatureStrategySegmentsSchema',
|
|
{
|
|
strategyId: '1',
|
|
segmentIds: [],
|
|
},
|
|
),
|
|
).toMatchSnapshot();
|
|
});
|