1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-11-01 19:07:38 +01:00
unleash.unleash/src/lib/openapi/spec/feature-usage-schema.test.ts
andreas-unleash 64082440d4
OAS for client-metrics controller (#1739)
* OAS for client-metrics controller

* bug and tests

* update snapshot

* update snapshot

* update snapshot

* bug fix

* fix PR comments

* refactoring re PR comments

* re order routes

* remove grouped-client-metrics-schema.ts

* remove grouped-client-metrics-schema.ts

* updated response

* updated snapshot

* PR comments

* PR comments

* Added tests

* Added tests

* fix

* fix

* fix
2022-06-27 11:17:44 +03:00

24 lines
643 B
TypeScript

import { validateSchema } from '../validate';
import { FeatureUsageSchema } from './feature-usage-schema';
test('featureUsageSchema', () => {
const data: FeatureUsageSchema = {
featureName: 'some-name',
version: 2,
lastHourUsage: [
{
environment: 'some-env',
yes: 50,
no: 32,
timestamp: new Date(2020, 6, 1, 17, 50, 3).toISOString(),
},
],
maturity: 'stable',
seenApplications: [],
};
expect(
validateSchema('#/components/schemas/featureUsageSchema', data),
).toBeUndefined();
});