Installation
npm install --save @types/chai-jest-snapshot
Summary
This package contains type definitions for chai-jest-snapshot (https://github.com/suchipi/chai-jest-snapshot#readme).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/chai-jest-snapshot.
index.d.ts
/// <reference types="chai" />
/// <reference types="mocha" />
declare global {
namespace Chai {
interface Assertion {
/** Assert that the object matches the snapshot */
matchSnapshot(snapshotFilename?: string, snapshotName?: string, update?: boolean): Assertion;
matchSnapshot(update: boolean): Assertion;
}
}
}
interface ChaiJestSnapshot extends Chai.ChaiPlugin {
/** Set snapshot file name */
setFilename(filename: string): void;
/**
* Set snapshot test name
*/
setTestName(testname: string): void;
/** Configure snapshot name using mocha context */
configureUsingMochaContext(context: Mocha.Context): void;
/** Reset snapshot registry */
resetSnapshotRegistry(): void;
/** Add a serializer plugin */
addSerializer(serializer: any): void;
}
declare var ChaiJestSnapshot: ChaiJestSnapshot;
export = ChaiJestSnapshot;
Additional Details
- Last updated: Mon, 06 Nov 2023 22:41:05 GMT
- Dependencies: @types/chai, @types/mocha
Credits
These definitions were written by Matt Perry.