-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Written a React recipe (with an example) #462
Conversation
Can you add it to the readme: https://github.com/sindresorhus/ava#recipes |
I think this recipe should focus strictly on React + AVA, without explaining version history, react code, etc. Examples of that:
Could you please put more explanatory text in the recipe? I also noticed a few code suggestions, they should be listed below. Thanks for your contribution and looking forward to merge this into master! |
return <span />; | ||
}; | ||
|
||
FieldError.propTypes = { |
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.
Not necessary for the demo
Sure, I'll make the necessary fixes. How does this work, do I close the PR, fix the code then resubmit? (Sorry if these questions seems silly, as I said, I'm a noob at contributing in this manner :)) |
@tomazzaman No, you never need to resubmit the PR. Just push additional commits. See this guide: https://github.com/RichardLitt/docs/blob/master/amending-a-commit-guide.md |
Thanks for the guidance! |
@@ -0,0 +1,69 @@ | |||
# React testing | |||
|
|||
With 0.10.0, AVA stopped including your `.babelrc` (for reasons outlined in [this PR](https://github.com/sindresorhus/ava/pull/398)), which means you can't use JSX in your test/spec files. Note that this doesn't apply to your source files, they can still be written in JSX! |
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.
I was under the impression that there is soon to be a release that allows you to specify a .babelrc
to use or some way to configure babel yourself. Is this not true?
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.
I think we are pretty close to agreement on how it should look. But the implementation is not written yet.
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.
In the interest of future-proofing this documentation, a reference to the relevant issue might be helpful here. Can't seem to find it right now though.
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.
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.
@tomazzaman Maybe we should use in the example |
@tomazzaman Would you be able to finish this? :) |
Closing for lack of activity. This is pretty moot now anyways as we finally have a solution for the Babel mess #573. |
No description provided.