Skip to content
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

Closed
wants to merge 1 commit into from

Conversation

dignifiedquire
Copy link
Member

@jbenet jbenet added the status/in-progress In progress label Jan 1, 2016
@dignifiedquire dignifiedquire added codereview and removed status/in-progress In progress labels Jan 1, 2016
@@ -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),
Copy link
Member

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.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:)

@daviddias
Copy link
Member

This looks nice! Can we also have a test example for a piece of functionality?

@dignifiedquire
Copy link
Member Author

@diasdavid what kind of functionality do you mean?

@daviddias
Copy link
Member

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?

dignifiedquire added a commit that referenced this pull request Jan 2, 2016
This also upgrades the test story to be more
useful as I found some issues with the one before.
So this superseeds #154.

Closes #131
@dignifiedquire
Copy link
Member Author

Closing in favor of #156

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants