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

Rudimentary tests for not covered entry points #11835

Conversation

yu-tian113
Copy link
Contributor

Add tests for ReactART Circle, Rectangle, Wedge components.

@yu-tian113
Copy link
Contributor Author

Hi @gaearon , this is the follow up PR for #11750 , changes are

  • Add tests to ReactART Circle, Rectangle, and Wedge
  • Add redirections for source testing

I've also searched the codebase for entry points not covered in tests.

  • All entry points are covered in source testing
  • react-reconciler/reflection and react-dom/unstable-native-dependencies are not covered in build testing

A question regarding the Circle, Rectangle, and Wedge components, are they considered a part of ReactART? Why we put them in npm but src? And should we refactor them with ES6 syntax to align with ReactART?

Thanks.

)
.getInstance();
expect(wedgeInstance._degreesToRadians(0)).toBe(0);
expect(wedgeInstance._degreesToRadians(180)).toBe(3.141592653589793);
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don’t think we should be calling internal functions. Just using props is enough.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok, these tests are removed.
Can't find a good way to test the math generating path, all other props are covered in snapshot tests.
Please let me know if anything's missing.

@gaearon gaearon merged commit 8ec146c into facebook:master Dec 13, 2017
@gaearon
Copy link
Collaborator

gaearon commented Dec 13, 2017

Thanks!

yenshih pushed a commit to yenshih/react that referenced this pull request Jan 6, 2018
* Add basic snapshot tests to ReactART components (Circle, Rectangle, Wedge)

* More tests on Circle, Rectangle, Wedge

* linc warning fixes

* - remove tests to Wedge component internal function

* More test on Wedge component, update snapshots
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants