Update react-redux-toastr-tests.ts

This commit is contained in:
Aleksandar Ivanov
2016-09-20 12:55:37 +03:00
committed by GitHub
parent 18780a108d
commit e6e922c65a
+1 -24
View File
@@ -1,6 +1,6 @@
///<reference path="react-redux-toastr.d.ts" />
///<reference path="../react/react.d.ts" />
///<reference path="../react-dom/react-dom.d.ts" />
///<reference path="../react/react-dom.d.ts" />
///<reference path="../react-redux/react-redux.d.ts" />
import {toastr, reducer as toastrReducer, actions} from 'react-redux-toastr';
import ReduxToastr from 'react-redux-toastr';
@@ -16,29 +16,6 @@ function test() {
var providerFactory = React.createFactory(Provider);
var root = providerFactory({ store: store }, element);
class Test extends React.Component<any, {}>{
private toastr;
constructor() {
super()
this.toastr = bindActionCreators(actions, this.props.dispatch);
this.toastr.clean();
this.toastr.success("hi");
}
}
var TestComponent = connect(mapStateToProps, mapDispatchToProps)(Test);
function mapDispatchToProps(dispatch) {
return {
actions: bindActionCreators(actions, dispatch)
};
}
function mapStateToProps(state) {
return {};
}
function callback() { }
toastr.clean();