mirror of
https://github.com/chenasraf/DefinitelyTyped.git
synced 2026-05-18 01:49:01 +00:00
* chore: use jest v28 deps * chore: raise ts version * chore: update ts to 4.5 `@sinclair/typebox` needs this * chore: bump ts * chore: bump ts version * chore: bump ts * chore: lower ts to 4.3 Co-authored-by: Simen Bekkhus <sbekkhus91@gmail.com> * fix: align minimum ts version with readme Co-authored-by: Simen Bekkhus <sbekkhus91@gmail.com>
28 lines
1020 B
TypeScript
28 lines
1020 B
TypeScript
// Type definitions for jest-specific-snapshot 0.5
|
|
// Project: https://github.com/igor-dv/jest-specific-snapshot#readme
|
|
// Definitions by: Janeene Beeforth <https://github.com/dawnmist>
|
|
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
// Minimum TypeScript Version: 4.3
|
|
|
|
/// <reference types="jest" />
|
|
|
|
declare global {
|
|
namespace jest {
|
|
interface Matchers<R, T> {
|
|
toMatchSpecificSnapshot(snapshotFilename: string): R;
|
|
}
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Specify the serializer that should be used by toMatchSpecificSnapshot.
|
|
* Note: toMatchSpecificSnapshot ignores the existing jest snapshot serializer settings. If you want to use a custom serializer,
|
|
* you need to set it via this addSerializer function.
|
|
*/
|
|
export function addSerializer(serializer: any): void;
|
|
|
|
/**
|
|
* This is used to create a customized version of toMatchSpecificSnapshot.
|
|
*/
|
|
export function toMatchSpecificSnapshot(data: any, snapshotFile: string, testName: string): () => { message(): string; pass: boolean; };
|