@cdwr/core
Version:
A set of core utilities for the Codeware ecosystem.
24 lines (23 loc) • 825 B
TypeScript
import { type SchemaMetadata } from './schema-registry.class';
import { type ValidationResult } from './validate-schema';
export type TestResult = {
schemaName: string;
status: 'success' | 'failure' | 'skipped';
details?: string;
fixtureFile: string;
fixtureKey: string;
transformed?: unknown;
metadata: Omit<SchemaMetadata, 'schema'> | undefined;
errors: ValidationResult['errors'] | null;
};
/**
* @internal
* Runs schema tests for all fixtures in the given directory.
*
* It's recommended to use `createSchemaTests` to run the test cases
* and output a detailed test report.
*
* @param fixtureDir - Absolute path to the directory containing the fixture files
* @returns An array of test results
*/
export declare function runSchemaTests(fixtureDir: string): Promise<TestResult[]>;