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

Testing Overview: update JS example to use React Testing Library #34423

Merged
merged 10 commits into from
Sep 1, 2021

Conversation

ciampo
Copy link
Contributor

@ciampo ciampo commented Aug 31, 2021

Description

As agreed in #33960 (comment), this PR updates the JS section of the Testing Overview docs:

  • Enzyme examples refactored to React Testing Library
  • Slightly changed the wording around RTL and Enzyme
  • Added a section about the toMatchDiffSnapshot function

How has this been tested?

👀

Screenshots

Types of changes

Docs

Checklist:

  • N/A My code is tested.
  • N/A My code follows the WordPress code style.
  • N/A My code follows the accessibility standards.
  • N/A I've tested my changes with keyboard and screen readers.
  • My code has proper inline documentation.
  • I've included developer documentation if appropriate.
  • N/A I've updated all React Native files affected by any refactorings/renamings in this PR (please manually search all *.native.js files for terms that need renaming or removal).

@ciampo ciampo added the [Type] Developer Documentation Documentation for developers label Aug 31, 2021
@ciampo ciampo requested a review from ajitbohra as a code owner August 31, 2021 15:14
@ciampo ciampo self-assigned this Aug 31, 2021
@ciampo ciampo requested a review from chrisvanpatten as a code owner August 31, 2021 15:14
@gziolo gziolo requested a review from sarayourfriend August 31, 2021 19:27
@gziolo gziolo added the [Type] Automated Testing Testing infrastructure changes impacting the execution of end-to-end (E2E) and/or unit tests. label Aug 31, 2021
@sarayourfriend
Copy link
Contributor

In addition to toMatchDiffSnapshot should there be a blurb about toMatchStyleDiffSnapshot?

Copy link
Member

@gziolo gziolo left a comment

Choose a reason for hiding this comment

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

There are some tiny details to discuss before this lands.

Anyway, overall these changes look great. Thank you very much for bringing so desperately needed refresh to testing overview ❤️

docs/contributors/code/testing-overview.md Outdated Show resolved Hide resolved
docs/contributors/code/testing-overview.md Outdated Show resolved Hide resolved
@ciampo
Copy link
Contributor Author

ciampo commented Sep 1, 2021

In addition to toMatchDiffSnapshot should there be a blurb about toMatchStyleDiffSnapshot?

Absolutely! I've added a paragraph about it in 3f4ef39 (#34423).

@gziolo @sarayourfriend @diegohaz all feedback so far should have been tackled, let me know if there's anything else you'd like to see amended!

@gziolo
Copy link
Member

gziolo commented Sep 1, 2021

You can wait for @diegohaz for his feedback because he is more experienced with testing components 😄

Copy link
Member

@diegohaz diegohaz left a comment

Choose a reason for hiding this comment

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

This looks great to me! Thanks @ciampo! 🚀

@ciampo ciampo merged commit e834828 into trunk Sep 1, 2021
@ciampo ciampo deleted the feat/rewrite-testing-overview-javascript branch September 1, 2021 10:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Automated Testing Testing infrastructure changes impacting the execution of end-to-end (E2E) and/or unit tests. [Type] Developer Documentation Documentation for developers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants