@types/chai-jest-snapshot
TypeScript icon, indicating that this package has built-in type declarations

1.3.8 • Public • Published

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

Credits

These definitions were written by Matt Perry.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/chai-jest-snapshot

Weekly Downloads

8,685

Version

1.3.8

License

MIT

Unpacked Size

4.66 kB

Total Files

5

Last publish

Collaborators

  • types