mirror of
https://github.com/Unleash/unleash.git
synced 2025-07-21 13:47:39 +02:00
Upgrades biome to 1.6.1, and updates husky pre-commit hook. Most changes here are making type imports explicit.
27 lines
887 B
TypeScript
27 lines
887 B
TypeScript
import fc, { type Arbitrary } from 'fast-check';
|
|
import {
|
|
playgroundResponseSchema,
|
|
type PlaygroundResponseSchema,
|
|
} from '../../../lib/openapi/spec/playground-response-schema';
|
|
import { validateSchema } from '../validate';
|
|
import { generate as generateInput } from './playground-request-schema.test';
|
|
import { generate as generateFeature } from './playground-feature-schema.test';
|
|
|
|
const generate = (): Arbitrary<PlaygroundResponseSchema> =>
|
|
fc.record({
|
|
input: generateInput(),
|
|
features: fc.uniqueArray(generateFeature(), {
|
|
selector: (feature) => feature.name,
|
|
}),
|
|
});
|
|
|
|
test('playgroundResponseSchema', () =>
|
|
fc.assert(
|
|
fc.property(
|
|
generate(),
|
|
(data: PlaygroundResponseSchema) =>
|
|
validateSchema(playgroundResponseSchema.$id, data) ===
|
|
undefined,
|
|
),
|
|
));
|