DefinitelyTyped/types/jest-matcher-utils/index.d.ts
2019-02-12 14:36:28 -08:00

46 lines
1.4 KiB
TypeScript

// Type definitions for jest-matcher-utils 21.0
// Project: https://github.com/facebook/jest
// Definitions by: Alex Coles <https://github.com/myabc>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.2
import { Chalk } from 'chalk';
export const EXPECTED_COLOR: Chalk;
export const RECEIVED_COLOR: Chalk;
export const EXPECTED_BG: Chalk; // TODO: removed in b430e51a
export const RECEIVED_BG: Chalk; // TODO: removed in b430e51a
export const SUGGEST_TO_EQUAL: string;
export function stringify(object: any, maxDepth?: number): string;
export function highlightTrailingWhitespace(
text: string,
bgColor: Chalk // removed in b430e51a
): string;
export function printReceived(object: any): string;
export function printExpected(value: any): string;
export function printWithType(
name: string,
received: any,
print: (value: any) => string
): string;
export function ensureNoExpected(actual: any, matcherName?: string): void;
export function ensureActualIsNumber(actual: any, matcherName?: string): void;
export function ensureExpectedIsNumber(actual: any, matcherName?: string): void;
export function ensureNumbers(
actual: any,
expected: any,
matcherName?: string
): void;
export function pluralize(word: string, count: number): string;
export function matcherHint(
matcherName: string,
received?: string,
expected?: string,
options?: { secondArgument?: string; isDirectExpectCall?: boolean }
): string;