mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-02-03 23:42:50 +00:00
fix: enzyme -> allow contains fns to accept arrays (react 16)
This commit is contained in:
parent
5761cfc6f2
commit
8cf04ecafa
8
types/enzyme/index.d.ts
vendored
8
types/enzyme/index.d.ts
vendored
@ -54,22 +54,22 @@ export interface CommonWrapper<P = {}, S = {}> {
|
||||
/**
|
||||
* Returns whether or not the current wrapper has a node anywhere in it's render tree that looks like the one passed in.
|
||||
*/
|
||||
contains(node: ReactElement<any> | string): boolean;
|
||||
contains(node: ReactElement<any> | Array<ReactElement<any>> | string): boolean;
|
||||
|
||||
/**
|
||||
* Returns whether or not a given react element exists in the shallow render tree.
|
||||
*/
|
||||
containsMatchingElement(node: ReactElement<any>): boolean;
|
||||
containsMatchingElement(node: ReactElement<any> | Array<ReactElement<any>>): boolean;
|
||||
|
||||
/**
|
||||
* Returns whether or not all the given react elements exists in the shallow render tree
|
||||
*/
|
||||
containsAllMatchingElements(nodes: Array<ReactElement<any>>): boolean;
|
||||
containsAllMatchingElements(nodes: Array<ReactElement<any>> | Array<Array<ReactElement<any>>>): boolean;
|
||||
|
||||
/**
|
||||
* Returns whether or not one of the given react elements exists in the shallow render tree.
|
||||
*/
|
||||
containsAnyMatchingElements(nodes: Array<ReactElement<any>>): boolean;
|
||||
containsAnyMatchingElements(nodes: Array<ReactElement<any>> | Array<Array<ReactElement<any>>>): boolean;
|
||||
|
||||
/**
|
||||
* Returns whether or not the current render tree is equal to the given node, based on the expected value.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user