@types/chai-enzyme
- Version 0.6.13
- Published
- 7.45 kB
- 4 dependencies
- MIT license
Install
npm i @types/chai-enzyme
yarn add @types/chai-enzyme
pnpm add @types/chai-enzyme
Overview
TypeScript definitions for chai-enzyme
Index
Namespaces
namespace Chai
namespace Chai {}
interface Assertion
interface Assertion {}
method attr
attr: (key: string, val?: string) => Assertion;
Assert that the wrapper has given attribute [with value]:
Parameter key
Parameter val
method blank
blank: () => Assertion;
Assert that the given wrapper is empty:
method checked
checked: () => Assertion;
Assert that the given wrapper is checked:
method className
className: (name: string) => Assertion;
Assert that the wrapper has a given class:
Parameter name
method containMatchingElement
containMatchingElement: (selector: EnzymeSelector) => Assertion;
Assert that the wrapper contains a certain element:
Parameter selector
method data
data: (key: string, val?: string) => Assertion;
Assert that the wrapper has a given data attribute [with value]:
Parameter key
Parameter val
method descendants
descendants: (selector?: EnzymeSelector) => Assertion;
Assert that the wrapper contains a descendant matching the given selector:
Parameter selector
method disabled
disabled: () => Assertion;
Assert that the given wrapper is disabled:
method exactly
exactly: (count?: number) => Assertion;
Assert that the wrapper contains an exact amount of descendants matching the given selector:
method html
html: (str?: string) => Assertion;
Assert that the wrapper has given html:
Parameter str
method id
id: (str: string) => Assertion;
Assert that the wrapper has given ID attribute:
Parameter str
method present
present: () => Assertion;
Assert that the given wrapper exists:
method prop
prop: (key: string, val?: any) => Assertion;
Assert that the wrapper has given prop [with value]:
Parameter key
Parameter val
method props
props: { (keys: string[]): Assertion; (props: any): Assertion };
Assert that the wrapper has given props [with values]:
Parameter keys
Assert that the wrapper has given props [with values]:
Parameter props
method ref
ref: (key: string) => Assertion;
Assert that the wrapper has a given ref
Parameter key
method selected
selected: () => Assertion;
Assert that the given wrapper is selected:
method state
state: (key: string, val?: any) => Assertion;
Assert that the wrapper has given state [with value]:
Parameter key
Parameter val
method style
style: (key: string, val?: string) => Assertion;
Assert that the wrapper has given style:
Parameter key
Parameter val
method tagName
tagName: (str: string) => Assertion;
Assert that the given wrapper has the tag name:
Parameter str
method text
text: (str?: string) => Assertion;
Assert that the given wrapper has the supplied text:
Parameter str
method type
type: (func: EnzymeSelector) => Assertion;
Assert that the given wrapper has a given type:
Parameter func
method value
value: (str: string) => Assertion;
Assert that the given wrapper has given value:
Parameter str
interface Include
interface Include {}
method text
text: (str?: string) => Assertion;
Assert that the given wrapper has the supplied text:
Parameter str
call signature
(selector: EnzymeSelector): Assertion;
Assert that the wrapper contains a given node:
Parameter code
interface Match
interface Match {}
call signature
(selector: EnzymeSelector): Assertion;
Assert that the wrapper matches given selector:
Parameter selector
type EnzymeSelector
type EnzymeSelector = | string | React.FunctionComponent<any> | React.ComponentClass<any> | { [key: string]: any };
namespace chai-enzyme
module 'chai-enzyme' {}
function chaiEnzyMe
chaiEnzyMe: ( wrapper?: (debugWrapper: DebugWrapper) => string) => Chai.ChaiPlugin;
Package Files (1)
Dependencies (4)
Dev Dependencies (0)
No dev dependencies.
Peer Dependencies (0)
No peer dependencies.
Badge
To add a badge like this oneto your package's README, use the codes available below.
You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@types/chai-enzyme
.
- Markdown[![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/@types/chai-enzyme)
- HTML<a href="https://www.jsdocs.io/package/@types/chai-enzyme"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>
- Updated .
Package analyzed in 3803 ms. - Missing or incorrect documentation? Open an issue for this package.