Skip to content

Commit

Permalink
Enzyme: Restore strongly typed props for classes
Browse files Browse the repository at this point in the history
Add Pick typings for setState/setProps
Fix Cheerio wrapper to reference Cheerio typings, clean up ReactWrapper
Remove deprecated APIs
Add tslint and fix errors
Normalize React+Shallow wrapper tests and add some missing overload tests
  • Loading branch information
jwbay committed Jan 26, 2017
1 parent be23e1a commit b03ba92
Show file tree
Hide file tree
Showing 4 changed files with 189 additions and 461 deletions.
5 changes: 3 additions & 2 deletions chai-enzyme/index.d.ts
Expand Up @@ -8,6 +8,7 @@
/// <reference types="enzyme" />
/// <reference types="chai" />
/// <reference types="react" />
/// <reference types="cheerio" />

declare namespace Chai {
type EnzymeSelector = string | React.StatelessComponent<any> | React.ComponentClass<any> | { [key: string]: any };
Expand Down Expand Up @@ -143,9 +144,9 @@ declare namespace Chai {
}

declare module "chai-enzyme" {
import { ShallowWrapper, ReactWrapper, CheerioWrapper } from "enzyme";
import { ShallowWrapper, ReactWrapper } from "enzyme";

type DebugWrapper = ShallowWrapper<any,any> | CheerioWrapper<any, any> | ReactWrapper<any, any>;
type DebugWrapper = ShallowWrapper<any,any> | Cheerio | ReactWrapper<any, any>;
function chaiEnzyMe(wrapper?: (debugWrapper: DebugWrapper) => string): (chai: any) => void;

module chaiEnzyMe {
Expand Down

0 comments on commit b03ba92

Please sign in to comment.