@types/jest-specific-snapshot
Version:
TypeScript definitions for jest-specific-snapshot
46 lines (37 loc) • 1.49 kB
Markdown
# Installation
> `npm install --save @types/jest-specific-snapshot`
# Summary
This package contains type definitions for jest-specific-snapshot (https://github.com/igor-dv/jest-specific-snapshot#readme).
# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/jest-specific-snapshot.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/jest-specific-snapshot/index.d.ts)
````ts
/// <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(
this: jest.MatcherContext,
data: any,
snapshotFile: string,
testName?: string,
): { message(): string; pass: boolean };
````
### Additional Details
* Last updated: Wed, 04 Feb 2026 18:12:09 GMT
* Dependencies: [@types/jest](https://npmjs.com/package/@types/jest)
# Credits
These definitions were written by [Janeene Beeforth](https://github.com/dawnmist).