mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-23 21:00:01 +08:00
[chai-enzyme] Add support for version 0.6.1
This commit is contained in:
@@ -40,5 +40,8 @@ expect(wrapper).to.have.data("test", "Test");
|
||||
expect(wrapper).to.have.style("background", "green");
|
||||
expect(wrapper).to.have.state("test", "test");
|
||||
expect(wrapper).to.have.prop("test", 5);
|
||||
expect(wrapper).to.have.props(["test1", "test2"]);
|
||||
expect(wrapper).to.have.props({ test: 5 });
|
||||
expect(wrapper).to.contain(<Test/>);
|
||||
expect(wrapper).to.containMatchingElement(<Test/>);
|
||||
expect(wrapper).to.match(<Test/>);
|
||||
|
||||
20
chai-enzyme/index.d.ts
vendored
20
chai-enzyme/index.d.ts
vendored
@@ -1,4 +1,4 @@
|
||||
// Type definitions for chai-enzyme 0.5.0
|
||||
// Type definitions for chai-enzyme 0.6.1
|
||||
// Project: https://github.com/producthunt/chai-enzyme
|
||||
// Definitions by: Alexey Svetliakov <https://github.com/asvetliakov>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
@@ -39,6 +39,12 @@ declare namespace Chai {
|
||||
*/
|
||||
className(name: string): Assertion;
|
||||
|
||||
/**
|
||||
* Assert that the wrapper contains a certain element:
|
||||
* @param selector
|
||||
*/
|
||||
containMatchingElement(selector: EnzymeSelector): Assertion;
|
||||
|
||||
/**
|
||||
* Assert that the wrapper contains a descendant matching the given selector:
|
||||
* @param selector
|
||||
@@ -140,6 +146,18 @@ declare namespace Chai {
|
||||
* @param val
|
||||
*/
|
||||
prop(key: string, val?: any): Assertion;
|
||||
|
||||
/**
|
||||
* Assert that the wrapper has given props [with values]:
|
||||
* @param keys
|
||||
*/
|
||||
props(keys: string[]): Assertion;
|
||||
|
||||
/**
|
||||
* Assert that the wrapper has given props [with values]:
|
||||
* @param props
|
||||
*/
|
||||
props(props: EnzymeSelector): Assertion;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user