UNPKG

@cdwr/core

Version:

A set of core utilities for the Codeware ecosystem.

50 lines (49 loc) 1.34 kB
type CreateSchemaTestsOptions = { /** * Absolute path to the directory containing schemas */ schemaDir: string; /** * Relative path to `schemaDir` containing fixture data. * Fixtures can be stored in subfolders and must be JSON files. * * @default `__fixtures__` */ fixturesPath?: string; /** * Optional test suite description */ description?: string; /** * Optional groups for result reporting */ groups?: Array<{ name: string; tags: string[]; }>; /** * Whether to use snapshot testing for transformed data. * * Snapshot testing help you: * * - See the exact shape of your transformed data * - Catch unintended changes in transformation * - Have a reference for the expected structure * * @default `false` */ snapshots?: boolean; }; /** * Creates a test suite for validating schemas against fixture data. * * This function must be called within a test file. * * Prerequisites: * - schemas to be registered using `SchemaRegistry.register` * - fixture data to be stored in the `fixturesPath` directory * * @param options - The options for creating the test suite */ export declare const createSchemaTests: (options: CreateSchemaTestsOptions) => void; export {};