mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-31 00:16:47 +01:00
53354224fc
Upgrades biome to 1.6.1, and updates husky pre-commit hook. Most changes here are making type imports explicit.
28 lines
714 B
TypeScript
28 lines
714 B
TypeScript
import { validateSchema } from '../validate';
|
|
import type { SegmentsSchema } from './segments-schema';
|
|
|
|
test('updateEnvironmentSchema', () => {
|
|
const data: SegmentsSchema = {
|
|
segments: [],
|
|
};
|
|
|
|
expect(
|
|
validateSchema('#/components/schemas/segmentsSchema', data),
|
|
).toBeUndefined();
|
|
|
|
expect(
|
|
validateSchema('#/components/schemas/segmentsSchema', {
|
|
segments: [],
|
|
additional: 'property',
|
|
}),
|
|
).toBeUndefined();
|
|
|
|
expect(
|
|
validateSchema('#/components/schemas/segmentsSchema', {}),
|
|
).toMatchSnapshot();
|
|
|
|
expect(
|
|
validateSchema('#/components/schemas/segmentsSchema', 'not an object'),
|
|
).toMatchSnapshot();
|
|
});
|