npm.io
7.0.5 • Published 1 year ago

@types/jasmine-enzyme

Licence
MIT
Version
7.0.5
Deps
2
Size
6 kB
Vulns
0
Weekly
0
Stars
51.4K

Installation

npm install --save @types/jasmine-enzyme

Summary

This package contains type definitions for jasmine-enzyme (https://github.com/formidablelabs/enzyme-matchers/packages/jasmine-enzyme).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/jasmine-enzyme.

index.d.ts

/// <reference types="jasmine" />
/// <reference types="react" />

declare function jasmineEnzyme(): void;
export = jasmineEnzyme;

declare global {
    namespace jasmine {
        interface Matchers<T> {
            toBeChecked(): void;
            toBeDisabled(): void;
            toBeEmptyRender(): void;
            toContainMatchingElement(selector: string): void;
            toContainMatchingElements(num: number, selector: string): void;
            toContainExactlyOneMatchingElement(selector: string): void;
            toContainReact(reactInstance: React.JSX.Element): void;
            toExist(): void;
            toHaveClassName(className: string): void;
            toHaveDisplayName(tagName: string): void;
            toHaveHTML(html: string): void;
            toHaveProp(propKey: string, propValue?: any): void;
            toHaveRef(refName: string): string;
            toHaveState(stateKey: string, stateValue?: any): void;
            toHaveStyle(styleKey: string, styleValue?: any): void;
            toHaveTagName(tagName: string): void;
            toHaveText(text?: string): void;
            toIncludeText(text: string): void;
            toHaveValue(value: any): void;
            toMatchElement(reactInstance: React.JSX.Element): void;
            toMatchSelector(selector: string): void;
        }
    }
}

Additional Details

Credits

These definitions were written by Umar Bolatov, and Steve Gravrock.