) => Boolean): T; + + /** + * Removes nodes in the current wrapper that do not match the provided selector. + * @param selector The selector to match. + */ + filter(selector: EnzymeSelector): T; + + /** + * Returns a new wrapper with only the nodes of the current wrapper that, when passed into the provided predicate function, return true. + * @param predicate + */ + filterWhere(predicate: (shallowWrapper: ShallowWrapper
) => Boolean): T;
+
+ /**
+ * Returns whether or not the current wrapper has a node anywhere in it's render tree that looks like the one passed in.
+ * @param node
+ */
+ contains(node: ReactElement ;
+
+ /**
+ * Forces a re-render. Useful to run before checking the render output if something external may be updating
+ * the state of the component somewhere.
+ * Returns itself.
+ *
+ * NOTE: can only be called on a wrapper instance that is also the root instance.
+ */
+ update(): T;
+
+ /**
+ * Returns an html-like string of the wrapper for debugging purposes. Useful to print out to the console when
+ * tests are not passing when you expect them to.
+ */
+ debug(): String;
+
+ /**
+ * Returns the type of the current node of this wrapper. If it's a composite component, this will be the
+ * component constructor. If it's native DOM node, it will be a string of the tag name.
+ *
+ * Note: can only be called on a wrapper of a single node.
+ */
+ type(): String | Function;
+
+ /**
+ * Iterates through each node of the current wrapper and executes the provided function with a wrapper around
+ * the corresponding node passed in as the first argument.
+ *
+ * Returns itself.
+ * @param fn A callback to be run for every node in the collection. Should expect a ShallowWrapper as the first
+ * argument, and will be run with a context of the original instance.
+ */
+ forEach(fn: (wrapper: ShallowWrapper ) => void): T;
+
+ /**
+ * Maps the current array of nodes to another array. Each node is passed in as a ShallowWrapper to the map
+ * function.
+ * Returns an array of the returned values from the mapping function..
+ * @param fn A mapping function to be run for every node in the collection, the results of which will be mapped
+ * to the returned array. Should expect a ShallowWrapper as the first argument, and will be run
+ * with a context of the original instance.
+ */
+ map(fn: (wrapper: ShallowWrapper ) => any): Array , index: number) => R, initialValue?: R): R[];
+
+ /**
+ * Applies the provided reducing function to every node in the wrapper to reduce to a single value.
+ * Each node is passed in as a ShallowWrapper, and is processed from right to left.
+ * @param fn
+ * @param initialValue
+ */
+ reduceRight , index: number) => R, initialValue?: R): R[];
+
+ /**
+ * Returns whether or not any of the nodes in the wrapper match the provided selector.
+ * @param selector
+ */
+ some(selector: EnzymeSelector): Boolean;
+
+ /**
+ * Returns whether or not any of the nodes in the wrapper pass the provided predicate function.
+ * @param fn
+ */
+ someWhere(fn: (wrapper: ShallowWrapper ) => Boolean): Boolean;
+
+ /**
+ * Returns whether or not all of the nodes in the wrapper match the provided selector.
+ * @param selector
+ */
+ every(selector: EnzymeSelector): Boolean;
+
+ /**
+ * Returns whether or not any of the nodes in the wrapper pass the provided predicate function.
+ * @param fn
+ */
+ everyWhere(fn: (wrapper: ShallowWrapper ) => Boolean): Boolean;
+
+ length: number;
+ }
+
+ export interface ShallowWrapper extends CommonWrapper ;
+
+ render(): CheerioWrapper ;
+ }
+
+ export interface ReactWrapper extends CommonWrapper extends CommonWrapper (node: ReactElement , options?: any): ShallowWrapper ;
+
+ /**
+ * Mounts and renders a react component into the document and provides a testing wrapper around it.
+ * @param node
+ * @param [options]
+ */
+ export function mount (node: ReactElement , options?: any): ReactWrapper ;
+
+ /**
+ * Render react components to static HTML and analyze the resulting HTML structure.
+ * @param node
+ * @param [options]
+ */
+ export function render (node: ReactElement , options?: any): CheerioWrapper ;
+
+ export function describeWithDOM(description: String, fn: Function): void;
+
+ export function spyLifecycle(component: typeof Component): void;
+}
\ No newline at end of file