-
Notifications
You must be signed in to change notification settings - Fork 488
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tests: Add example test for react component #154
Conversation
@@ -11,7 +11,7 @@ export default React.createClass({ | |||
|
|||
getInitialState: function () { | |||
return { | |||
body: JSON.stringify(this.props.config, null, ' '), | |||
body: JSON.stringify(this.props.config, null, 2), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This just blew my mind a little bit, never knew you could specify a number instead of a string.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:)
This looks nice! Can we also have a test example for a piece of functionality? |
@diasdavid what kind of functionality do you mean? |
Right now the test is to see if it the view is rendered correctly, right? I guess that every test can be performed by an amount of assertions on the elements that were rendered, but for things like "Check if the files uploaded list is correct" could be tested without the UI part? |
Closing in favor of #156 |
cc @RichardLitt @diasdavid