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

Add docs to testing-library-docs #15

Open
mpeyper opened this issue Mar 19, 2019 · 17 comments
Open

Add docs to testing-library-docs #15

mpeyper opened this issue Mar 19, 2019 · 17 comments
Labels
docs Changes to the documentation good first issue Good for newcomers help wanted Extra attention is needed

Comments

@mpeyper
Copy link
Member

mpeyper commented Mar 19, 2019

There is an existing PR created to add docs to testing-library-docs from when testHook was part of react-testing-library. Since it was removed and the code merged with this library, the PR has stalled waiting on updates to change it to reference this library instead.

If anyone wants to take over the PR and update it accordingly, you are more than welcome. You can even add yourself as a contributor here for your effort too.

See the PR for more details.

Disclaimer: I am not affiliated with the testing-library-docs repo or the PR in question, but I was asked to take it over and just find myself a bit time poor to actually do so at the moment.

@mpeyper mpeyper added help wanted Extra attention is needed good first issue Good for newcomers docs Changes to the documentation labels Mar 19, 2019
@ab18556
Copy link
Contributor

ab18556 commented Mar 20, 2019

@mpeyper could you point me out exactly what needs to be done? I might be interested to do it.

@DavidBabel
Copy link

Hey guys, thanks for your lib, it looks promising. But it will be interesting if you can provide more examples in the doc. Especially on the rerender part, which is not very clear for me at this point.

@mpeyper
Copy link
Member Author

mpeyper commented Mar 21, 2019

@ab18556 It was suggested that it would be useful to add some documentation in the ecosystem section of https://testing-library.com/docs/intro.

Some work was previously done when the API was part of react-testing-library, but it would need to be updated to reference react-hooks-testing-library instead of react-testing-library and moved into the other section now.

The API is also slightly different now to when the PR was created the main differences from the top of my head:

  • testHook -> renderHook
  • initialProps and rerender(newProps)
  • waitForNextUpdate()

It probably doesn't need to be too over the top with information, just the basics and a link back to our own docs (which also need to be improved).

@ab18556
Copy link
Contributor

ab18556 commented Mar 22, 2019

Ok I will give it a try tomorrow night

@mpeyper
Copy link
Member Author

mpeyper commented Mar 22, 2019

Great! I've also raised #19 now which is also around docs (but our own) if your keen for that as well?

@ab18556
Copy link
Contributor

ab18556 commented Mar 22, 2019

Sorry, I won't be able to update the doc. I am short on time and since english is my secondary language, I don't think I would be the best person to do it.

About the current issue, I made this PR testing-library/testing-library-docs#64

It is based on the current doc's example. It might have to be updated once the doc is updated.

@alexkrolick
Copy link

Thanks for the PR @ab18556, it's a good start. I think at least establishing an ecosystem page like this one would be enough to merge: https://github.com/alexkrolick/testing-library-docs/blob/master/docs/ecosystem-user-event.md

@ab18556
Copy link
Contributor

ab18556 commented Mar 23, 2019

@alexkrolick this is basically what I put into the example page. Maybe it shouldn't be in the example section?

@alexkrolick
Copy link

Ok, moving it all into the ecosystem page sounds good, too.

@ab18556
Copy link
Contributor

ab18556 commented Mar 25, 2019

@mpeyper Any thoughts?

@mpeyper
Copy link
Member Author

mpeyper commented Apr 26, 2019

Sorry @ab18556 for not giving my thoughts (this one went under my radar).

I'm going to close this as since #40, we are no longer using react-testing-library for our rendering, so I'm no sure it's appropriate for us to be included in their docs anymore, unless there was some disclaimer added about this.

@mpeyper mpeyper closed this as completed Apr 26, 2019
@alexkrolick
Copy link

It definitely fits in the ecosystem section, other things like native-testing-library or jest-dom don't depend on any core libs either

@mpeyper
Copy link
Member Author

mpeyper commented Apr 27, 2019

I did not realise there was already precedence for this, so I'm happy to reopen this.

@mpeyper mpeyper reopened this Apr 27, 2019
@LeviButcher
Copy link
Contributor

@mpeyper What all needs done to finish this issue? I got some time on my hands and would love to wrap this issue up if possible.

@mpeyper
Copy link
Member Author

mpeyper commented Jun 26, 2020

@LeviButcher there was (still is) as desire to get some representation in the official Testing Library docs. The original efforts by @ab18556 were made where we were using react-testing-library for rendering and fit more neatly into the regular mix of libraries. There were some suggestions that it could still make sense in the Ecosystem section, but I'm not sure what the stance is on that these days (i.e. is the use of dom-testing-library a prerequisite for getting in the main docs).

From my perspective, I feel like many of the testing libraries get to lean on the dom-testing-library docs for a lot of things (e.g. queries, async utils, etc.), whereas our implementation is a bit different so I would like to still maintain our own docs and have the a fairly basic example in the Testing Library docs and a link to our docs. Part of me feels like that's a duplication of effort though, so maybe we're best to look at moving what we have to the shared docs 🤷‍♂️

I'm open to suggestions on how best to do it.

@theresasogunle
Copy link

@LeviButcher I am available to work with you on this as well, If thats fine.

@LeviButcher
Copy link
Contributor

@theresasogunle Absolutely!

I definitely agree with adding it to the ecosystem section in the Testing Library docs and based on past pull requests that seems to be what everyone agreed to.

I think we should copy the first examples on this page of the react hooks docs and put it in a hook testing library ecosystem page with a link back to the react hooks testing library docs.

I think this is a perfect first time contributor pull request and I noticed you haven't contributed to this one yet. So I was wondering if you would like to take the lead on contributing this to the testing-library-docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Changes to the documentation good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

6 participants