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

Merge with testHook - move package here? #1

Closed
1 of 3 tasks
alexkrolick opened this issue Feb 16, 2019 · 5 comments
Closed
1 of 3 tasks

Merge with testHook - move package here? #1

alexkrolick opened this issue Feb 16, 2019 · 5 comments

Comments

@alexkrolick
Copy link

alexkrolick commented Feb 16, 2019

Hi,
Some folks that worked on hook test utils in react-testing-library (@kentcdodds, @Donavan) are thinking about extracting testhook into its own package. The API is pretty similar to what you have here - would you consider reviewing the current state of that API and merging it with react-hooks-testing-library?

Discussion: testing-library/react-testing-library#302

WIP Docs for testHook: testing-library/testing-library-docs#32

Next steps:

  • Review and port the API if it is an improvement
  • Add a docs page in the "ecosystem" section of the docs repo
  • Port examples in the docs PR to extracted library
@mpeyper
Copy link
Member

mpeyper commented Feb 17, 2019

Hey,

I was just reading on twitter about testHook in react-testing-library and went to have a look when I saw the notification for this issue, lol.

This library was more of a proof of concept than anything for me when the hooks alpha was released and I only updated it recently to match the 16.8 changes. When I was checking out testHook's source, I thought that it was very similar to what I had here, and also thought it didn't make sense for both to compete with each other.

I've had a few ideas recently about some changes I want to make to the API, but haven't really locked it down in my head yet. What is here now is a little bit muddled, both in terminology and implementation.

I'd almost be comfortable scrapping what is here currently and starting with testHook as the base and build on from there (I imagine there are more people that would need an easier migration from react-testing-library than the few that would be using my library).

I'll take a closer look at testHook tonight and see what I think more on this after that.

@mpeyper
Copy link
Member

mpeyper commented Feb 17, 2019

Perhaps I'll do up a table of feature comparisons and we can discuss preferred approaches.

@mpeyper
Copy link
Member

mpeyper commented Feb 17, 2019

@alexkrolick looks good so far, check out the PR and let me know what you think.

@mpeyper mpeyper reopened this Feb 21, 2019
@mpeyper
Copy link
Member

mpeyper commented Feb 21, 2019

I'll leave this open for the time being.

The testHook code has been released as v0.3.0 on NPM

@mpeyper
Copy link
Member

mpeyper commented Mar 19, 2019

I'm going to close this in preference of #15.

As for the examples, I'm not sure the API is complex enough to worry with example over and above the README and the test suite, but I'm happy to review any PRs if people want to add them.

@mpeyper mpeyper closed this as completed Mar 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants