jest-validate
- Version 29.7.0
- Published
- 28.7 kB
- 6 dependencies
- MIT license
Install
npm i jest-validate
yarn add jest-validate
pnpm add jest-validate
Overview
Generic configuration validation tool that helps you with warnings, errors and deprecation messages as well as showing users examples of correct configuration.
Index
Functions
function createDidYouMeanMessage
createDidYouMeanMessage: ( unrecognized: string, allowedOptions: Array<string>) => string;
function format
format: (value: unknown) => string;
function logValidationWarning
logValidationWarning: ( name: string, message: string, comment?: string | null) => void;
function multipleValidOptions
multipleValidOptions: <T extends unknown[]>(...args: T) => T[number];
function validate
validate: ( config: Record<string, unknown>, options: ValidationOptions) => { hasDeprecationWarnings: boolean; isValid: boolean };
function validateCLIOptions
validateCLIOptions: ( argv: Config.Argv, options?: Record<string, Options> & { deprecationEntries?: DeprecatedOptions }, rawArgv?: Array<string>) => boolean;
Classes
class ValidationError
class ValidationError extends Error {}
constructor
constructor(name: string, message: string, comment?: string);
property message
message: string;
property name
name: string;
Type Aliases
type DeprecatedOptions
type DeprecatedOptions = Record<string, DeprecatedOptionFunc>;
Package Files (1)
Dependencies (6)
Dev Dependencies (1)
Peer Dependencies (0)
No peer dependencies.
Badge
To add a badge like this oneto your package's README, use the codes available below.
You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/jest-validate
.
- Markdown[![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/jest-validate)
- HTML<a href="https://www.jsdocs.io/package/jest-validate"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>
- Updated .
Package analyzed in 2212 ms. - Missing or incorrect documentation? Open an issue for this package.