You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 12, 2020. It is now read-only.
I was surprised to see that the boilerplate only contained unit tests for the actions, with no test coverage at the component level.
Then I started writing the component tests..
Does anyone have some boilerplate samples that they have gotten to work unit testing the smart components?
I'm brand new to React (this is my first real project) but I really would like to get unit tests working for components. I've spent some time researching it but all the responses were pretty disjointed to me, and I really just want a basic example of how to unit test a component, a component with this stuff at the bottom of it:
I was surprised to see that the boilerplate only contained unit tests for the actions, with no test coverage at the component level.
Then I started writing the component tests..
Does anyone have some boilerplate samples that they have gotten to work unit testing the smart components?
I'm brand new to React (this is my first real project) but I really would like to get unit tests working for components. I've spent some time researching it but all the responses were pretty disjointed to me, and I really just want a basic example of how to unit test a component, a component with this stuff at the bottom of it:
reactMixin(TimeBox.prototype, React.addons.LinkedStateMixin);
const mapStateToProps = (state) => ({
edit : state.storeHours.edithours,
hours : state.storeHours.hours
});
const mapDispatchToProps = (dispatch) => ({
actions : bindActionCreators(actionCreators, dispatch)
});
export default connect(mapStateToProps, mapDispatchToProps)(TimeBox);
Currently when I run my test against this component I receive:
TypeError: Cannot read property 'LinkedStateMixin' of undefined
This would be akin to testing the ProtectedView component from the boilerplate.
Thank you very much in advance!
The text was updated successfully, but these errors were encountered: