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

Add tests for Editable.adaptFormatter() #3894

Merged
merged 1 commit into from Dec 23, 2017

Conversation

Projects
None yet
2 participants
@BE-Webdesign
Contributor

BE-Webdesign commented Dec 9, 2017

Add tests for Editable.adaptFormatter()

@gziolo

This comment has been minimized.

Show comment
Hide comment
@gziolo

gziolo Dec 11, 2017

Member

I have one concern here. This test covers private function from the component. There was usually a rule to test only public API in the previous projects, I worked with. Do you think we should keep the same rule in Gutenberg? We can always move that method to the file with utilities when we fill that it deserves its own tests.

cc @aduth @youknowriad @mtias

Member

gziolo commented Dec 11, 2017

I have one concern here. This test covers private function from the component. There was usually a rule to test only public API in the previous projects, I worked with. Do you think we should keep the same rule in Gutenberg? We can always move that method to the file with utilities when we fill that it deserves its own tests.

cc @aduth @youknowriad @mtias

@gziolo

This comment has been minimized.

Show comment
Hide comment
@gziolo

gziolo Dec 11, 2017

Member

If we are fine with testing private methods, then it's good to go 👍

Member

gziolo commented Dec 11, 2017

If we are fine with testing private methods, then it's good to go 👍

@BE-Webdesign

This comment has been minimized.

Show comment
Hide comment
@BE-Webdesign

BE-Webdesign Dec 11, 2017

Contributor

One option is if these private methods are used somewhere in a public facing code we can get coverage that way. For now going to leave the PR open.

Contributor

BE-Webdesign commented Dec 11, 2017

One option is if these private methods are used somewhere in a public facing code we can get coverage that way. For now going to leave the PR open.

Show outdated Hide outdated blocks/editable/test/index.js Outdated
@gziolo

gziolo approved these changes Dec 15, 2017

Let's merge it, we can change our approach about testing private methods later.

@BE-Webdesign BE-Webdesign merged commit 204c6b8 into master Dec 23, 2017

3 checks passed

codecov/project 39.11% (+0.02%) compared to 21e5b26
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@BE-Webdesign BE-Webdesign deleted the add/test/editable/adapt-formatter branch Dec 23, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment