@japa/snapshot
Version:
Snapshot testing plugin for Japa
24 lines (23 loc) • 836 B
TypeScript
import { Frame } from 'jest-message-util';
import { PrettyFormatOptions } from 'pretty-format';
/**
* Prepares the expected string by removing unnecessary indentation and whitespace.
*/
export declare function prepareExpected(expected?: string): string | undefined;
/**
* Escapes backticks in the string
*/
export declare function escapeBackticks(str: string): string;
/**
* Wraps the string in backticks
*/
export declare function backticked(str: string): string;
/**
* Serialize the given snapshot value to a string using pretty-format
*/
export declare function serializeSnapshotValue(value: any, options?: PrettyFormatOptions): string;
export declare function getTopFrame(lines: string[]): Frame | null;
/**
* Check if a given module is installed
*/
export declare function isModuleInstalled(moduleName: string): boolean;