Skip to content

Instantly share code, notes, and snippets.

@ulisesantana
Created September 13, 2018 20:17
Show Gist options
  • Save ulisesantana/f5172240d996982df6b6d57f6906df93 to your computer and use it in GitHub Desktop.
Save ulisesantana/f5172240d996982df6b6d57f6906df93 to your computer and use it in GitHub Desktop.
redux-tdd typing
declare module "redux-tdd" {
import { ActionsObservable } from 'redux-observable';
import { combineReducers, ReducersMapObject } from 'redux'
import { shallow, ShallowWrapper } from 'enzyme';
class ReduxTdd {
constructor(reducers: ReducersMapObject, render: Function)
getCurrentWrapper(): ShallowWrapper
it(str: string): ReduxTdd
switch(key: string): ReduxTdd
action(fn: Function): ReduxTdd
debug(cb: Function): ReduxTdd
epic(epicFn: Function, dependencies: object): ReduxTdd
contains(arg: ShallowWrapper, truthy: boolean): ReduxTdd
view(fn: Function): ReduxTdd
toMatchProps(obj: object): ReduxTdd
}
export function props(wrapper: ShallowWrapper): object
export default function (reducers: ReducersMapObject, render: Function): ReduxTdd
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment