Closed ArrayZoneYour closed 5 years ago
const Button = connect( 'Counter', (props: any) => props )( class extends React.PureComponent<any> { render() { const { state, actions, buttonName = '' } = this.props return ( <button onClick={() => { actions.increment(3).catch((e: any) => console.error(e)) }} > {buttonName} {state.count} </button> ) } } )
<Provider> <Button buttonName="button" /> </Provider>
expect(button!.textContent).toBe('button0')
expect(button!.textContent).toBe('button0')