jest-prettyhtml-matchers
Version:
Custom Jest snapshot matchers that use prettyhtml to format strings.
16 lines (15 loc) • 862 B
TypeScript
import type { PrettyHtmlOptions } from './types';
declare global {
namespace jest {
interface Matchers<R> {
toMatchInlinePrettyHtmlSnapshot(inlineSnapshot?: string): R;
toMatchInlinePrettyHtmlSnapshot(options?: PrettyHtmlOptions, inlineSnapshot?: string): R;
toMatchPrettyHtmlSnapshot(hint?: string): R;
toMatchPrettyHtmlSnapshot(options: PrettyHtmlOptions, hint?: string): R;
}
}
}
export declare const createPrettyHtmlMatchers: (options?: PrettyHtmlOptions) => {
toMatchPrettyHtmlSnapshot: (this: any, received: string, options?: PrettyHtmlOptions | string, hint?: string) => import("expect").ExpectationResult;
toMatchInlinePrettyHtmlSnapshot: (this: any, received: string, options?: PrettyHtmlOptions | string, inlineSnapshot?: string) => import("expect").ExpectationResult;
};